Skip to content

Commit

Permalink
Push to protected branches fix (#113)
Browse files Browse the repository at this point in the history
* chore: add cross-env to enable Windows support

* chore: semantic-release pushing to protected branches with fine-grained token

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
vorotech and dependabot[bot] authored Mar 10, 2024
1 parent 67be4e2 commit 485844e
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
name: Release

on:
push:
branches: [ "main" ]

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4
with:
node-version: 18
- run: npm ci
- run: npm test

fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Run CI scripts
run: npm ci
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Run tests
run: npm test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
run: npm run semantic-release

0 comments on commit 485844e

Please sign in to comment.