-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (49 loc) · 1.29 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
defaults:
run:
shell: bash
jobs:
create:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
steps:
- uses: actions/create-release@v1
id: release
env:
GITHUB_TOKEN: ${{ github.token }}
with:
draft: true
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
assets:
needs: create
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '~1.23'
- run: |
make build
chmod +x bin/audit-tool
echo "asset_path=bin/audit-tool" >> $GITHUB_ENV
echo "asset_name=audit-tool-$(go env GOOS)-$(go env GOARCH)$(go env GOEXE)" >> $GITHUB_ENV
- run: make ${{ env.asset_path }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.create.outputs.upload_url }}
asset_path: ${{ env.asset_path }}
asset_name: ${{ env.asset_name }}
asset_content_type: application/octet-stream