Skip to content

v2.3 add bun

v2.3 add bun #21

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Building & Publishing to NPM
on:
push:
branches:
- main
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
# Caching dependencies
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run changeset version
run: npx changeset version
- name: Commit version changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m "chore: Bump versions" || echo "No changes to commit"
git push
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}