Publish Alpha Version #13
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: "Publish Alpha Version" | |
on: | |
workflow_dispatch: | |
inputs: | |
name: | |
type: choice | |
description: Which package to release | |
options: | |
- supex | |
- create-supex | |
jobs: | |
publish: | |
name: 🚀 Publishing to NPM | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- name: Set variables | |
run: | | |
echo "COMMIT_ID=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "VERSION=$(npm view ./packages/${{ github.event.inputs.name }} version)" >> $GITHUB_ENV | |
- name: Publish packages | |
run: | | |
pnpm install --no-frozen-lockfile | |
pnpm --filter "${{ github.event.inputs.name }}" build | |
pnpm --filter "${{ github.event.inputs.name }}" exec pnpm version ${{ env.VERSION }}-alpha.${{ env.COMMIT_ID }} | |
pnpm --filter "${{ github.event.inputs.name }}" publish --tag alpha --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |