Allow manual release workflow dispatch

This commit is contained in:
Ken Hibino 2021-01-31 11:36:12 -08:00
parent 6025d1155d
commit 3627a98f95

View File

@ -1,6 +1,8 @@
on: on:
workflow_dispatch:
release: release:
types: [published, created, edited] types:
- created
jobs: jobs:
release: release:
@ -27,26 +29,28 @@ jobs:
with: with:
node-version: "12" node-version: "12"
- name: Install NPM packages - name: Get release
run: cd ui && rm yarn.lock && yarn install id: release
- id: release
uses: bruceadams/get-release@v1.2.2 uses: bruceadams/get-release@v1.2.2
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
- name: Install NPM packages
run: cd ui && rm yarn.lock && yarn install
- name: Build release binary - name: Build release binary
run: | run: |
GOOS=${{ matrix.goos }} GOARCH=amd64 make build GOOS=${{ matrix.goos }} GOARCH=amd64 make build
tar -czvf asynqmon_${{ steps.release.outputs.tag_name }}_${{ matrix.goos }}_amd64.tar.gz asynqmon tar -czvf asynqmon_${{ steps.release.outputs.tag_name }}_${{ matrix.goos }}_amd64.tar.gz asynqmon
ls ls
- name: Upload release binary - name: Upload Release Asset
uses: actions/upload-release-asset@v1.0.2 id: upload-release-asset
uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
with: with:
upload_url: ${{ steps.release.outputs.upload_url }} upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./asynqmon_${{ steps.release.outputs.tag_name }}_${{ matrix.goos }}-amd64.tar.gz 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 asset_name: asynqmon_${{ steps.release.outputs.tag_name }}_${{ matrix.goos }}_amd64.tar.gz
asset_content_type: application/gzip asset_content_type: application/zip