Skip to content

chore: version packages (beta) (#604) #235

chore: version packages (beta) (#604)

chore: version packages (beta) (#604) #235

Workflow file for this run

name: Release Beta
on:
workflow_dispatch:
push:
branches:
- develop
# Wait for the workflow to finish before starting a new one
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release-beta:
# Only allow on develop branch
if: ${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
token: ${{ secrets.BCLABUM_GITHUB_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Install node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Git config
run: |
git config user.name "bclabum"
git config user.email "[email protected]"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.BCLABUM_PGP }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Makes a pr to publish the changesets (when merged will publish to npm)
# see https://github.com/changesets/action
- name: Publish To NPM or Create Release Pull Request
uses: martines3000/[email protected]
id: changesets
with:
version: bash scripts/changesets/version-beta.sh
publish: bash scripts/changesets/publish-beta.sh
title: 'chore: version packages'
commit: 'chore: version packages'
setupGitUser: false
env:
GITHUB_TOKEN: ${{ secrets.BCLABUM_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}