v1.0.0-beta-5 #7
Workflow file for this run
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 Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the exact commit tagged on the release. | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- name: Validate and extract release information | |
id: release | |
uses: manovotny/github-releases-for-automated-package-publishing-action@v2.0.1 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Publish version | |
if: steps.release.outputs.tag == '' | |
run: pnpm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
- name: Publish tagged version | |
if: steps.release.outputs.tag != '' | |
run: pnpm publish --tag ${{ steps.release.outputs.tag }} --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |