Skip to content

Publish Stable

Publish Stable #15

Workflow file for this run

name: Publish Stable
on:
workflow_dispatch:
# Wait for the workflow to finish before starting a new one
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release-stable:
# Only allow on master branch
if: ${{ github.ref == 'refs/heads/master' }}
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: master
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 "blockchain-lab@um.si"
- 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/changeset-action@v1.5.0
id: changesets
with:
publish: bash scripts/changesets/publish-stable.sh
title: 'chore: version packages'
commit: 'chore: version packages'
forcePublish: true
setupGitUser: false
env:
GITHUB_TOKEN: ${{ secrets.BCLABUM_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}