Skip to content

chore: change team from DX to Tundra [EXT-5235] #214

chore: change team from DX to Tundra [EXT-5235]

chore: change team from DX to Tundra [EXT-5235] #214

Workflow file for this run

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/vault-action@v2.4.3
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 }}