ci: add workflow to publish alpha versions #1
This file contains hidden or 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 Alpha | |
| on: | |
| push: | |
| branches: | |
| - release/alpha | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release-alpha: | |
| name: Release Alpha | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| packages: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.RELEASE_TOKEN }} | |
| - name: Setup Node.js, pnpm and Nx cache | |
| uses: ./.github/actions/setup | |
| with: | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Build Packages | |
| run: pnpm build:packages | |
| - name: Setup Git User | |
| run: | | |
| git config --global user.name "LouisMazel" | |
| git config --global user.email "12446546+LouisMazel@users.noreply.github.com" | |
| - name: Version Packages (Alpha) | |
| run: | | |
| pnpm lerna:version:alpha | |
| - name: Commit version and changelog | |
| run: | | |
| VERSION=$(jq -r '.version' lerna.json) | |
| git add . | |
| git commit -m "chore: bump version to $VERSION" | |
| - name: Publish to NPM (Alpha) | |
| run: | | |
| pnpm lerna:publish:alpha | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |