Skip to content

chore: bump version in package, update readme #9

chore: bump version in package, update readme

chore: bump version in package, update readme #9

Workflow file for this run

# How version bumping and publishing works?
# Developer creates a tag with correct version number,
# attaches to the latest commit & pushes to the main branch
name: CI
on:
push:
tags:
- '*'
# pull_request:
# types: [closed]
# branches:
# - main
permissions:
id-token: write #for OIDC
contents: read
jobs:
build:
runs-on: 'ubuntu-latest'
# if: ${{github.event.pull_request.merged}}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{secrets.PAT_TOKEN}}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.22
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Configure name and email
run: |
git config user.name ${{secrets.GH_USERNAME}}
git config user.email ${{secrets.GH_EMAIL}}
# commit message should include a valid tag
# for pushing with tags use --follow-tags
- name: Bump app version as per the tag
run: |
bun pm version from-git -m "chore: update version"
- name: Publish to npm using OIDC
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Sync with repo
run: git push origin main