From 1caebedfbc7aae7300ca84e89e00aaab08c45679 Mon Sep 17 00:00:00 2001 From: Gligor Kotushevski Date: Wed, 17 May 2023 08:40:57 +1200 Subject: [PATCH] fix: Updated publishing script and only run tag on the main repo, not forks (#665) * Only run tag if new version on the main repo, not on forks * fixing GitHub tag name for GitHub release publishing * add missing build step to publish script * updated build step --- .github/workflows/integration.yml | 1 + .github/workflows/publish.yml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d4a4b8c8..81ec766f 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -194,6 +194,7 @@ jobs: tag-if-new-version: runs-on: ubuntu-latest needs: [node-integration-tests, python-integration-tests] + if: github.repository_owner == 'serverless' steps: - name: Checkout repository diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f96de9a5..bf3ebcf8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,6 +44,9 @@ jobs: run: | npm ci + - name: Build local package + run: npm run build + - name: Publish new version # Note: Setting NODE_AUTH_TOKEN as job|workspace wide env var won't work # as it appears actions/setup-node sets own value @@ -54,6 +57,6 @@ jobs: - name: Create and publish a release uses: softprops/action-gh-release@v1 with: - tag_name: ${GITHUB_REF##*/} + tag_name: ${{ github.ref_name }} prerelease: false generate_release_notes: true