Release and Publish #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release and Publish | |
run-name: Release and Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Release-Please | |
uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: node | |
token: ${{ secrets.BASALT_TOKEN }} | |
changelog-types: > | |
[ | |
{ "type": "feat", "section": "Features", "hidden": false }, | |
{ "type": "fix", "section": "Bug Fixes", "hidden": false }, | |
{ "type": "perf", "section": "Performance Improvements", "hidden": false }, | |
{ "type": "refactor", "section": "Code Refactoring", "hidden": false }, | |
{ "type": "build", "section": "Build System", "hidden": false }, | |
{ "type": "test", "section": "Tests", "hidden": false }, | |
{ "type": "ci", "section": "Continuous Integration", "hidden": false }, | |
{ "type": "docs", "section": "Documentation", "hidden": false }, | |
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false }, | |
{ "type": "revert", "section": "Reverts", "hidden": false }, | |
{ "type": "style", "section": "Styles", "hidden": false } | |
] | |
- name: Checkout | |
uses: actions/checkout@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: 'https://registry.npmjs.org' | |
if: ${{ steps.release.outputs.release_created }} | |
- run: bun install | |
if: ${{ steps.release.outputs.release_created }} | |
- run: bun run build | |
if: ${{ steps.release.outputs.release_created }} | |
- run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
if: ${{ steps.release.outputs.release_created }} |