Skip to content

Commit 6aa0607

Browse files
committed
ci: build more targets
1 parent 1067657 commit 6aa0607

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,21 @@ jobs:
3838
runs-on: ubuntu-latest
3939
strategy:
4040
matrix:
41-
goos: ['windows', 'linux', 'darwin']
42-
goarch: ['amd64', 'arm64']
41+
target:
42+
- 'windows/amd64'
43+
- 'windows/386'
44+
- 'windows/arm64'
45+
- 'linux/amd64'
46+
- 'linux/386'
47+
- 'linux/arm64'
48+
- 'linux/arm'
49+
- 'darwin/amd64'
50+
- 'darwin/arm64'
51+
- 'freebsd/386'
52+
- 'freebsd/amd64'
53+
- 'freebsd/arm'
54+
- 'openbsd/amd64'
55+
- 'openbsd/arm64'
4356
steps:
4457
- name: Checkout code
4558
uses: actions/checkout@v3
@@ -49,10 +62,16 @@ jobs:
4962
with:
5063
go-version: '1.20'
5164

65+
- name: Set up GOOS and GOARCH
66+
id: setup_env
67+
run: |
68+
echo "goos=$(echo ${{ matrix.target }} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
69+
echo "goarch=$(echo ${{ matrix.target }} | cut -d'/' -f2)" >> $GITHUB_OUTPUT
70+
5271
- name: Build
5372
env:
54-
GOOS: ${{ matrix.goos }}
55-
GOARCH: ${{ matrix.goarch }}
73+
GOOS: ${{ steps.setup_env.outputs.goos }}
74+
GOARCH: ${{ steps.setup_env.outputs.goarch }}
5675
run: |
5776
set -euo pipefail
5877
@@ -69,7 +88,7 @@ jobs:
6988
- name: Upload Artifacts
7089
uses: actions/upload-artifact@v3
7190
with:
72-
name: vegeta_${{ matrix.goos }}_${{ matrix.goarch }}
91+
name: vegeta_${{ steps.setup_env.outputs.goos }}_${{ steps.setup_env.outputs.goarch }}
7392
path: |
7493
*.zip
7594
*.tar.gz
@@ -116,7 +135,7 @@ jobs:
116135
PREV_VERSION=$(git describe --tags --abbrev=0 $CURRENT_VERSION^)
117136
RELEASE_NOTES=${{ github.workspace }}/release-notes.txt
118137
119-
echo "## Changelog\n" > $RELEASE_NOTES
138+
printf "## Changelog\n\n" > $RELEASE_NOTES
120139
git log ${PREV_VERSION}..${CURRENT_VERSION} --oneline --abbrev-commit >> $RELEASE_NOTES
121140
cat $RELEASE_NOTES
122141

0 commit comments

Comments
 (0)