-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 1.72 KB
/
Copy pathsemantic-release.yaml
File metadata and controls
64 lines (62 loc) · 1.72 KB
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
---
name: Semantic Release
on:
push:
branches:
- main
workflow_call:
inputs:
GH_APP_ID:
type: string
required: false
semantic_release_plugins:
type: string
required: false
default: ''
description: Space-separated list of additional semantic-release plugins to install.
secrets:
GH_APP_PEM_FILE:
required: false
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Create GitHub App token
uses: actions/create-github-app-token@v3
id: gh-app-token
if: ${{ inputs.GH_APP_ID != '' }}
with:
app-id: ${{ inputs.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PEM_FILE }}
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ steps.gh-app-token.outputs.token || secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- name: Install Semantic Release
run: >
npm install
semantic-release
conventional-changelog-conventionalcommits
@semantic-release/changelog
@semantic-release/git
semantic-release-major-tag
${{ inputs.SEMANTIC_RELEASE_PLUGINS }}
- name: Verify Semantic Release
run: npm audit signatures
- name: Run Semantic Release
env:
GITHUB_TOKEN: ${{ steps.gh-app-token.outputs.token || secrets.GITHUB_TOKEN }}
run: npx semantic-release