Skip to content

Pipeline

Pipeline #4

Workflow file for this run

name: Pipeline
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 18
- name: Build & Test
run: |
npm install
npm run build
npm run test
- name: Publish to >> npmjs.com
run: |
echo registry=https://registry.npmjs.org/ > .npmrc
echo //registry.npmjs.org/:_authToken=${TOKEN} >> .npmrc
npm publish --access public
env:
TOKEN: ${{ secrets.NPM_TOKEN }} # token has been issued on January 4, 2023. It's valid for 1 year
- name: Publish to >> github.com
run: |
echo registry=https://npm.pkg.github.com/ > .npmrc
echo //npm.pkg.github.com/:_authToken=${TOKEN} >> .npmrc
npm publish --access public
env:
TOKEN: ${{ github.token }}
- name: Fetch package version
run: node -p -e '`TAG=${require("./package.json").version}`' >> $GITHUB_ENV
- name: Commit release tag
uses: hole19/git-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}