From 2e92af2f9a22d26700a73945b1569b962b5685fe Mon Sep 17 00:00:00 2001 From: Marcos Oliveira Date: Sat, 28 Nov 2020 04:12:03 -0300 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d60489..88f4473 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,12 +1,7 @@ name: Release on: - push: - branches: - - master - pull_request: - branches: - - master + workflow_dispatch: jobs: build: @@ -84,7 +79,10 @@ jobs: with: name: macos-latest path: _release/platform-darwin-x64 - + + - uses: actions-ecosystem/action-get-latest-tag@v1 + id: get-latest-tag + - name: Create archives for Github release run: | cd _release/platform-darwin-x64 @@ -96,18 +94,16 @@ jobs: - name: Create Github release id: create_release - if: "startsWith(github.ref, 'refs/tags/v')" uses: actions/create-release@v1.0.0 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ steps.get-latest-tag.outputs.tag }} + release_name: Release ${{ steps.get-latest-tag.outputs.tag }} draft: false prerelease: false - name: Upload spin-darwin-x64.zip to Github release - if: "startsWith(github.ref, 'refs/tags/v')" uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} @@ -118,7 +114,6 @@ jobs: asset_content_type: application/gzip - name: Upload spin-linux-x64.zip to Github release - if: "startsWith(github.ref, 'refs/tags/v')" uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}