-
-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (72 loc) · 1.99 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 }}