Skip to content

Commit e9e5880

Browse files
committed
ci: improve release workflow
1 parent 803f9f0 commit e9e5880

File tree

3 files changed

+28
-22
lines changed

3 files changed

+28
-22
lines changed

.github/workflows/push.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ jobs:
1212
with:
1313
go-version: '1.16'
1414
- name: Run build
15-
run: |
16-
go build .
15+
run: go build .
16+
- name: upload artifact of build output
17+
uses: actions/upload-artifact@v2
18+
with:
19+
name: build
20+
path: worker
1721

1822
lint:
1923
runs-on: ubuntu-latest
@@ -44,11 +48,18 @@ jobs:
4448
steps:
4549
- name: Checkout
4650
uses: actions/checkout@v2
51+
- name: Download build artifact
52+
uses: actions/download-artifact@v2
53+
with:
54+
name: build
55+
path: .
56+
- name: Create release archive
57+
run: tar -czvf release.tar.gz worker README.md LICENSE
4758
- name: Setup Node.js
4859
uses: actions/setup-node@v2
4960
with:
5061
node-version: 14
5162
- name: Release
5263
env:
53-
GITHUB_TOKEN: ${{ secrets.TOKEN }}
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5465
run: npx semantic-release

.github/workflows/release.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.releaserc.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@
55
"plugins": [
66
"@semantic-release/commit-analyzer",
77
"@semantic-release/release-notes-generator",
8-
"@semantic-release/github"
8+
[
9+
"@semantic-release/github",
10+
{
11+
"successComment": false,
12+
"releasedLabels": false,
13+
"assets": [
14+
{
15+
"path": "release.tar.gz",
16+
"name": "worker-${nextRelease.gitTag}-linux-amd64.tar.gz",
17+
"label": "worker-${nextRelease.gitTag}-linux-amd64.tar.gz"
18+
}
19+
]
20+
}
21+
]
922
]
1023
}

0 commit comments

Comments
 (0)