Skip to content

Version Stable

Version Stable #34

Workflow file for this run

name: Version Stable
on:
workflow_dispatch:
inputs:
selected-package:
description: 'Package to version and publish to npm.'
required: true
default: 'all'
type: choice
options:
- 'all'
- '@blockchain-lab-um/masca'
- '@blockchain-lab-um/masca-types'
- '@blockchain-lab-um/masca-connector'
- '@blockchain-lab-um/veramo-datamanager'
- '@blockchain-lab-um/utils'
- '@blockchain-lab-um/did-provider-key'
- '@blockchain-lab-um/did-provider-ebsi'
- '@blockchain-lab-um/oidc-types'
- '@blockchain-lab-um/oidc-client-plugin'
- '@blockchain-lab-um/oidc-rp-plugin'
- '@blockchain-lab-um/dapp'
# Wait for the workflow to finish before starting a new one
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
version-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@v3
with:
fetch-depth: 0
ref: master
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.6.10
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18.16.0
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@v5
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_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Exit pre-release mode
run: pnpm changeset pre exit
# 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-stable.sh ${{ github.event.inputs.selected-package }}
publish: ''
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 }}