From c9c7177e2a2971247080eaa6b8eea16df17fe6cf Mon Sep 17 00:00:00 2001 From: Tim Lai Date: Tue, 14 Feb 2023 15:09:20 -0800 Subject: [PATCH] ci(release): merge workflow updates into 'next' branch (#8386) --- .github/workflows/release-swagger-ui-react.yml | 2 +- .github/workflows/release-swagger-ui.yml | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-swagger-ui-react.yml b/.github/workflows/release-swagger-ui-react.yml index d38c3016..fd7aa2ee 100644 --- a/.github/workflows/release-swagger-ui-react.yml +++ b/.github/workflows/release-swagger-ui-react.yml @@ -73,6 +73,6 @@ jobs: run: | cd ../dist pwd - npm pack . + npm publish . env: NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/release-swagger-ui.yml b/.github/workflows/release-swagger-ui.yml index 432f418e..b2ccec0d 100644 --- a/.github/workflows/release-swagger-ui.yml +++ b/.github/workflows/release-swagger-ui.yml @@ -15,15 +15,12 @@ jobs: with: fetch-depth: 0 persist-credentials: false - submodules: true ref: next - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 16 - registry-url: https://npm.pkg.github.com/ - scope: "@swagger-api" - name: Determine the next release version uses: cycjimmy/semantic-release-action@v3 @@ -34,8 +31,7 @@ jobs: @semantic-release/exec env: GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Nothing to release if: ${{ env.NEXT_RELEASE_VERSION == '' }} @@ -46,8 +42,6 @@ jobs: - name: Install dependencies run: npm ci - env: - NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} - name: Semantic Release id: semantic @@ -58,8 +52,7 @@ jobs: @semantic-release/git env: GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Release failed if: steps.semantic.outputs.new_release_published == 'false'