ci: add PAT token to repo scope #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-release | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
pull-requests: write # to be able to comment on released pull requests | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
cache: npm | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Build Project | ||
run: npm run build | ||
- name: Semantic Release | ||
env: | ||
GITHUB_TOKEN: ${{ repository.PAT }} | ||
Check failure on line 31 in .github/workflows/build-and-release.yml GitHub Actions / build-and-releaseInvalid workflow file
Check failure on line 31 in .github/workflows/build-and-release.yml GitHub Actions / build-and-releaseInvalid workflow file
|
||
BRANCH_NAME: ${{ github.ref_name }} | ||
run: npx semantic-release | ||