-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (58 loc) · 1.61 KB
/
release.yml
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
66
67
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
upload-cup:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
strategy:
matrix:
include:
- runner: ubuntu-latest
os: linux
arch: amd64
- runner: ubuntu-latest
os: linux
arch: arm64
- runner: macos-latest
os: darwin
arch: amd64
- runner: macos-latest
os: darwin
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- uses: actions/checkout@v3
- name: Prepare Directory
run: mkdir bin
- name: Build Cup
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go build -o bin/. ./cmd/cup/...
- name: Archive Cup
working-directory: bin
run: tar -a -cvf cup_${{ matrix.os }}_${{ matrix.arch }}.tar.gz cup
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-please.outputs.tag_name }} ./bin/cup_${{ matrix.os }}_${{ matrix.arch }}.tar.gz