chore(deps): bump nanoid from 3.3.7 to 3.3.8 #230
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: Node.js Package | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
types: [opened, synchronize] | |
branches: ['main'] | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
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: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: 'Retrieve NPM Token' | |
id: vault | |
uses: hashicorp/[email protected] | |
with: | |
url: ${{ secrets.VAULT_URL }} | |
role: ${{ github.event.repository.name }}-github-action | |
method: jwt | |
path: github-actions | |
exportEnv: false | |
secrets: | | |
secret/data/github/github_packages_write GITHUB_PACKAGES_WRITE_TOKEN | GITHUB_PACKAGES_WRITE_TOKEN ; | |
github/token/vercel-nextjs-toolkit-semantic-release token | GITHUB_TOKEN ; | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@contentful' | |
always-auth: true | |
- name: 'Create GH .npmrc' | |
shell: bash | |
run: | | |
echo -e "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}\n@contentful:registry=https://npm.pkg.github.com\nalways-auth=true" > .npmrc | |
env: | |
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_PACKAGES_WRITE_TOKEN }} | |
- run: npm ci | |
- run: npm run build | |
- run: npm test | |
- run: | | |
npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ steps.vault.outputs.GITHUB_PACKAGES_WRITE_TOKEN }} |