Skip to content

⚡ Publish

⚡ Publish #27

Workflow file for this run

name: ⚡ Publish
on:
workflow_run:
workflows: ['⚡ Coverage badges generation']
types:
- completed
jobs:
publish:
name: 🛩️ Publish
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: 📦 Setup bun
uses: oven-sh/setup-bun@v2
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
registry-url: 'https://registry.npmjs.org'
# cache: 'bun'
cache-dependency-path: ./package.json
- name: 📥 Install deps
run: bun install --frozen-lockfile
- name: ✏️ Bump package version
id: bumping-version
uses: jpb06/bump-package@latest
with:
major-keywords: BREAKING CHANGE
minor-keywords: feat,minor
patch-keywords: fix,chore
should-default-to-patch: true
commit-user: jpb06
commit-user-email: jpb.06@outlook.com
- name: ⚙️ Building package
run: bun run build
- name: 🚀 Publish package
if: steps.bumping-version.outputs.bump-performed == 'true'
run: npm publish ./dist --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}