From 09b180aee79384658e9aa3c3dade09d97a5d317a Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Sun, 28 Mar 2021 04:27:44 -0700 Subject: [PATCH] fix: only release on v tag and save source tgz to artifacts --- .github/workflows/main.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f9ffb8144..d2c021b81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -121,10 +121,19 @@ jobs: restore-keys: | ${{ runner.os }}-nexe + - name: Pack source + run: npm pack + + - name: Upload to Github artifacts + uses: actions/upload-artifact@v2 + with: + name: unraid-api + path: ${{ github.workspace }}/*-source.tgz + - name: Build binary run: npm i -g nexe && npm run build-binary - - name: Pack release + - name: Pack binary run: npm pack - name: Upload to Github artifacts @@ -134,7 +143,7 @@ jobs: path: ${{ github.workspace }}/*.tgz - name: Release to Github and s3 - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/v') uses: unraid/release-action@master env: GITHUB_USER: "unraid" @@ -145,7 +154,7 @@ jobs: # AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} - name: Create Sentry release - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/v') uses: getsentry/action-release@v1 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}