From 7b33ed3dedcdf65f33f06b67c4e9e2f2739d9613 Mon Sep 17 00:00:00 2001 From: awalias Date: Tue, 8 Sep 2020 03:31:06 +0800 Subject: [PATCH] fix: adds release assets to releases --- .github/workflows/release.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6b5bdf5d8..d1b7bdfb5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,12 +12,19 @@ jobs: node: ['12'] outputs: - status: ${{ steps.github-release.conclusion }} + status: ${{ steps.pre-release.outputs.release != steps.post-release.outputs.release }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - id: pre-release + uses: pozetroninc/github-action-get-latest-release@master + with: + owner: supabase + repo: gotrue + excludes: prerelease, draft + - name: Set up Node uses: actions/setup-node@v1 with: @@ -32,10 +39,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - id: post-release + uses: pozetroninc/github-action-get-latest-release@master + with: + owner: supabase + repo: gotrue + excludes: prerelease, draft + deploy: needs: release runs-on: ubuntu-18.04 - if: needs.release.outputs.status == 'success' + if: success() && needs.release.outputs.status == 'true' steps: - uses: actions/checkout@v2 @@ -56,7 +70,8 @@ jobs: - run: tar -czvf gotrue-${{ steps.releases.outputs.release }}.tar.gz gotrue - - uses: actions/upload-artifact@v1 + - uses: AButler/upload-release-assets@v2.0 with: - name: gotrue-${{ steps.releases.outputs.release }}.tar.gz - path: ./gotrue-${{ steps.releases.outputs.release }}.tar.gz \ No newline at end of file + files: 'gotrue-${{ steps.releases.outputs.release }}.tar.gz' + release-tag: ${{ steps.releases.outputs.release }} + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file