Release Beta #17
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 Beta | |
on: workflow_dispatch | |
jobs: | |
release_beta: | |
name: Release Beta | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
environment: | |
name: npm | |
url: https://www.npmjs.com/package/@hadronous/pic | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-bun | |
- uses: ./.github/actions/setup-commitizen | |
- uses: ./.github/actions/setup-nodejs | |
- name: Build package | |
run: bun build:pic | |
- name: Bump Version | |
run: cz bump --files-only --yes --prerelease beta | |
- name: Get New Version | |
run: echo "version=$(cz version --project)" >> "$GITHUB_ENV" | |
- name: Push changes to repository | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'chore: release ${{ env.version }}' | |
commit_options: '--no-verify --signoff' | |
file_pattern: .cz.toml CHANGELOG.md packages/pic/package.json | |
tagging_message: '${{ env.version }}' | |
- name: Generate Release Notes | |
run: cz changelog --incremental --file-name RELEASE_NOTES.md | |
- name: Publish to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
run: | | |
npm pack ./packages/pic/ | |
npm publish --verbose --access public --tag beta ./packages/pic/ | |
- name: Create Github release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'hadronous-pic-${{ env.version }}.tgz' | |
bodyFile: 'RELEASE_NOTES.md' | |
tag: '${{ env.version }}' | |
commit: 'main' | |
prerelease: true |