Skip to content

Update example

Update example #6

Workflow file for this run

name: Release Changeset Version
on:
push:
branches:
- main
jobs:
release:
name: Release Changeset Version
runs-on: ubuntu-latest
environment: release # Specify the environment
steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
# Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20.12.0'
cache: 'npm'
# Install the specified npm version
- name: Install npm
run: npm install -g [email protected]
# Install dependencies
- name: Install Dependencies
run: npm ci
# Set npm auth token
- name: Set NPM Auth Token
run: npm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Create the build and publish using changeset
- name: Publish Changeset
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}