-
Notifications
You must be signed in to change notification settings - Fork 22
65 lines (64 loc) · 1.99 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
on:
release:
types: [created]
workflow_dispatch:
name: Networking Release All
jobs:
delete_latest:
runs-on: ubuntu-latest
steps:
- name: Delete the "latest" Release
uses: dev-drprasad/[email protected]
with:
tag_name: latest
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
blockless_networking_release:
needs: delete_latest
strategy:
matrix:
goos: [darwin, linux, windows]
goarch: [amd64, arm64]
runs-on: ubuntu-latest
steps:
- name: set goos
run: echo "GOOS=${{ matrix.goos }}"
- name: set goarch
run: echo "GOARCH=${{ matrix.goarch }}"
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: "1.21.0"
check-latest: true
- run: env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} make
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: "tar"
directory: dist/
filename: ../b7s-${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz
path: b7s*
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: b7s-${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz
asset_name: b7s-${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz
asset_content_type: application/gzip
- name: Publish the Release
uses: softprops/action-gh-release@v1
with:
tag_name: latest
files: b7s-${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz
prerelease: true
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}