Skip to content

Commit

Permalink
Added: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Dec 11, 2023
1 parent bf428da commit 2fceaa7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
- id: setup-bun
name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- id: install-deps
name: Install dependencies
run: |
bun install
- id: update-package-version
name: Update package version
run: |
sed -i "s/\"version\": \".*\"/\"version\": \"${GITHUB_REF_NAME#v}\"/" package.json
- id: build
name: Build
run: |
bun run build
- uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 2fceaa7

Please sign in to comment.