Skip to content

Release

Release #162

Workflow file for this run

name: Release
on:
schedule:
- cron: '0 12 * * 0'
workflow_dispatch:
inputs:
release-type:
description: 'Release Type'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
- premajor
- preminor
- prepatch
- prerelease
prerelease:
description: 'Prerelease'
required: true
default: false
type: boolean
skip-if-no-diff:
description: 'Skip if no diff'
required: true
default: false
type: boolean
diff-targets:
description: 'Diff Targets'
required: false
default: '{index.*,lib/**/*,package.json,tsconfig.json,README.md,LICENSE}'
type: string
dry-run:
description: 'Dry run'
required: true
default: false
type: boolean
jobs:
build:
uses: ./.github/workflows/node.js.yml
codeql:
uses: ./.github/workflows/codeql-analysis.yml
release:
needs: [build, codeql]
concurrency: release
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.release.outputs.tag }}
skipped: ${{ steps.release.outputs.skipped }}
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- id: release
uses: CatChen/node-package-release-action@v2
with:
release-type: ${{ inputs.release-type || 'patch' }}
prerelease: ${{ inputs.prerelease || false }}
dry-run: ${{ inputs.dry-run || false }}
skip-if-no-diff: ${{ inputs.skip-if-no-diff || true }}
diff-targets: ${{ inputs.diff-targets || '{index.*,lib/**/*,package.json,tsconfig.json,README.md,LICENSE}' }}
publish:
needs: release
if: ${{ needs.release.outputs.skipped != 'true' }}
uses: ./.github/workflows/npm-publish.yml
secrets: inherit
with:
tag: ${{ needs.release.outputs.tag }}
dry-run: ${{ inputs.dry-run || false }}