2021-02-01 05:23:10 +08:00
|
|
|
name: Release
|
|
|
|
|
2021-01-31 22:24:12 +08:00
|
|
|
on:
|
2021-02-01 02:49:33 +08:00
|
|
|
release:
|
2021-02-01 03:36:12 +08:00
|
|
|
types:
|
|
|
|
- created
|
2021-01-31 22:24:12 +08:00
|
|
|
|
|
|
|
jobs:
|
2021-01-31 22:26:35 +08:00
|
|
|
release:
|
2021-01-31 22:24:12 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-02-01 02:49:33 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
goos: [darwin, linux, windows]
|
2021-01-31 22:24:12 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-01-31 22:26:35 +08:00
|
|
|
|
2021-01-31 22:24:12 +08:00
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-06-06 22:20:58 +08:00
|
|
|
go-version: 1.16
|
2021-01-31 22:26:35 +08:00
|
|
|
|
|
|
|
- name: Set up Node
|
|
|
|
uses: actions/setup-node@v2
|
2021-01-31 22:24:12 +08:00
|
|
|
with:
|
2021-01-31 22:26:35 +08:00
|
|
|
node-version: "12"
|
|
|
|
|
2021-02-01 03:36:12 +08:00
|
|
|
- name: Get release
|
|
|
|
id: release
|
2021-02-01 02:49:33 +08:00
|
|
|
uses: bruceadams/get-release@v1.2.2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
|
2021-02-01 03:36:12 +08:00
|
|
|
- name: Install NPM packages
|
|
|
|
run: cd ui && rm yarn.lock && yarn install
|
|
|
|
|
2021-10-10 21:33:38 +08:00
|
|
|
- name: Build Release Binary
|
2021-01-31 22:26:35 +08:00
|
|
|
run: |
|
2021-02-01 02:49:33 +08:00
|
|
|
GOOS=${{ matrix.goos }} GOARCH=amd64 make build
|
|
|
|
tar -czvf asynqmon_${{ steps.release.outputs.tag_name }}_${{ matrix.goos }}_amd64.tar.gz asynqmon
|
2021-01-31 22:26:35 +08:00
|
|
|
ls
|
2021-02-01 02:49:33 +08:00
|
|
|
|
2021-10-03 09:13:57 +08:00
|
|
|
- name: Upload Release Binary
|
2021-09-18 20:26:00 +08:00
|
|
|
id: upload-go-release-asset
|
2021-02-01 03:36:12 +08:00
|
|
|
uses: actions/upload-release-asset@v1
|
2021-02-01 02:49:33 +08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.release.outputs.upload_url }}
|
2021-02-01 03:36:12 +08:00
|
|
|
asset_path: ./asynqmon_${{ steps.release.outputs.tag_name }}_${{ matrix.goos }}_amd64.tar.gz
|
|
|
|
asset_name: asynqmon_${{ steps.release.outputs.tag_name }}_${{ matrix.goos }}_amd64.tar.gz
|
2021-09-18 20:26:00 +08:00
|
|
|
asset_content_type: application/gzip
|