Release to staging by @github-actions[bot] #178
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: Release | |
run-name: Release to ${{ inputs.environment || 'staging' }} by @${{ github.actor }} | |
permissions: | |
contents: write | |
packages: write | |
issues: read | |
pull-requests: write | |
id-token: write | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to run deployment in' | |
type: environment | |
required: true | |
default: staging | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.STACKLA_BOT_GITHUB_TOKEN }} | |
jobs: | |
release: | |
concurrency: | |
group: releases | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: Build & Release | |
run: | | |
npm install | |
npm run build | |
npx changeset version | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "chore: release [skip ci]" || true | |
git push origin master | |
npm publish --access public | |
npm publish --registry=https://npm.pkg.github.com/ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
GITHUB_REGISTRY_TOKEN: ${{ secrets.STACKLA_BOT_GITHUB_TOKEN }} |