v0.1.25 #3
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 to npmjs on release | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref_name }} | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- run: | | |
git config user.name "Github Action" | |
git config user.email [email protected] | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: npm ci | |
- name: Create new version | |
run: | | |
TAG_NAME="${GITHUB_REF##*/}" | |
npm version "$TAG_NAME" | |
git push origin HEAD:${{ github.event.release.target_commitish }} | |
- name: Publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} |