diff --git a/.github/workflows/release-on-push-to-mainline.yml b/.github/workflows/release-on-push-to-mainline.yml index 8b71f0ce..54522795 100644 --- a/.github/workflows/release-on-push-to-mainline.yml +++ b/.github/workflows/release-on-push-to-mainline.yml @@ -7,10 +7,6 @@ on: jobs: build: - permissions: - contents: write - issues: write - pull-requests: write runs-on: ubuntu-latest strategy: matrix: @@ -32,27 +28,42 @@ jobs: - name: Install if: matrix.node-version != '14.x' - # Without --ignore-scripts we get "footer's lines must not be longer than 100 characters [footer-max-line-length]" - # on the release step - run: npm ci --ignore-scripts + run: npm ci - name: Test run: npm test - - name: Verify Typescript Types - if: matrix.node-version == '20.x' - run: npm run verify-typescript-types - - name: Lint if: matrix.node-version == '20.x' run: npm run lint + - name: Verify Typescript Types + if: matrix.node-version == '20.x' + run: npm run verify-typescript-types + - name: Audit if: matrix.node-version == '20.x' run: npm audit --audit-level critical + release: + if: github.event_name == 'push' && github.ref == 'refs/heads/mainline' + permissions: + contents: write + issues: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20.x + - name: Install + # Without --ignore-scripts we get "footer's lines must not be longer than 100 characters [footer-max-line-length]" + # on the release step + run: npm ci --ignore-scripts - name: Release - if: github.event_name == 'push' && github.ref == 'refs/heads/mainline' && matrix.node-version == '20.x' run: npm run release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}