Skip to content

Commit

Permalink
chore: setup GitHub workflow for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
phukon committed Jan 12, 2025
1 parent 6d3b02d commit d632deb
Show file tree
Hide file tree
Showing 4 changed files with 1,877 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches:
- main
- next

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm install --frozen-lockfile
- run: pnpm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"prebuild": "npm run clean",
"build": "tsup",
"preversion": "npm run build",
"postversion": "git push --tags"
"postversion": "git push --tags",
"semantic-release": "semantic-release"
},
"author": "Riki Phukon",
"license": "MIT",
Expand All @@ -44,6 +45,7 @@
"@types/debug": "^4.1.12",
"@types/node": "^20.11.30",
"rimraf": "^5.0.5",
"semantic-release": "^24.2.1",
"tsup": "^8.0.2",
"typescript": "^5.4.3"
}
Expand Down
Loading

0 comments on commit d632deb

Please sign in to comment.