Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nakasyou authored Dec 28, 2024
1 parent ae3c726 commit e9f3dee
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Simple workflow for deploying static content to GitHub Pages
name: Publish to npm

on:
release:

permissions:
contents: read
pages: write
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install deps
run: bun i
- name: Build
run: bun run build:lib
- name: Update version in package.json
run: |
VERSION=${{ github.event.release.tag_name }}
echo "Updating package.json version to $VERSION"
npm version --no-git-tag-version $VERSION
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}

0 comments on commit e9f3dee

Please sign in to comment.