Skip to content

ci: Enforce conventional commits on PR titles (#79) #2

ci: Enforce conventional commits on PR titles (#79)

ci: Enforce conventional commits on PR titles (#79) #2

Workflow file for this run

name: Release
on:
push:
branches: [master]
workflow_dispatch:
inputs:
dry_run:
description: Run nx release in dry-run mode
required: true
default: true
type: boolean
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
with:
filter: tree:0
fetch-depth: 0
- uses: pnpm/action-setup@v6
with:
version: 10.33.0
run_install: false
- name: Setup git creds
env:
config_email: ${{ secrets.GIT_CONFIG_EMAIL }}
config_un: ${{ secrets.GIT_CONFIG_USERNAME }}
run: |
git config --local user.email ${config_email}
git config --local user.name ${config_un}
- run: pnpm install --frozen-lockfile
env:
HUSKY: 0
- name: Set up .npmrc for publishing
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run release dry-run
if: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
run: pnpm exec nx release --dry-run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run release
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run) }}
run: pnpm exec nx release --yes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true