Skip to content

Release

Release #1300

Workflow file for this run

name: Release
# Release on demand only
on:
workflow_dispatch:
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
# This environment contains secrets needed for publishing
environment: release
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
# Don't save creds in the git config (so it's easier to override later)
persist-credentials: false
- name: Install Node.js from .nvmrc
uses: actions/setup-node@dbe1369d7be17e7823f8c1ee1ae8bec5779239dd # v3
with:
node-version-file: .nvmrc
- run: yarn --frozen-lockfile
- run: yarn checkchange
- run: yarn lage build test
- name: Set git user
run: |
git config user.email "kchau@microsoft.com"
git config user.name "Ken Chau"
- name: Release
run: |
# Get the existing remote URL without creds, and use a trap (like try/finally)
# to restore it after this step finishes
trap "git remote set-url origin '$(git remote get-url origin)'" EXIT
# Add a token to the remote URL for auth during release
git remote set-url origin "https://$REPO_PAT@github.com/$GITHUB_REPOSITORY"
yarn release -y -n "$NPM_AUTHTOKEN"
env:
NPM_AUTHTOKEN: ${{ secrets.NPM_AUTHTOKEN }}
REPO_PAT: ${{ secrets.REPO_PAT }}