Skip to content

chore: publish to npm automatically #2

chore: publish to npm automatically

chore: publish to npm automatically #2

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- "ci/use-github-to-publish"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Get next version
id: get_next_version
uses: thenativeweb/get-next-version@main
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: |
yarn
yarn build
yarn config set version-git-tag false
npm pack
echo ${{ steps.get_next_version.outputs.version }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}