-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.yml
More file actions
57 lines (51 loc) · 1.61 KB
/
Copy pathrelease.yml
File metadata and controls
57 lines (51 loc) · 1.61 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
# Drop-in replacement for a manual "bump + prepare notes + commit + tag" job.
# The repo-specific build/test steps stay; the action owns the release plumbing.
name: Create Tag/Release
run-name: ${{ github.actor }} release ${{ inputs.bump }} on ${{ github.repository }}
on:
workflow_dispatch:
inputs:
bump:
description: 'Version bump type'
required: true
default: patch
type: choice
options:
- patch
- minor
- major
permissions:
contents: write
jobs:
release:
name: Bump, tag and release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Use a PAT (not GITHUB_TOKEN) so the pushed tag triggers your publish
# workflow (e.g. tag.yml). GITHUB_TOKEN pushes do not trigger workflows.
token: ${{ secrets.PAT_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install, build and smoke test
run: |
npm ci
npm run build
npm test
- name: Release
uses: softwarity/release-flow@v1
with:
bump: ${{ inputs.bump }}
# All of these are optional — defaults shown:
# notes-file: RELEASE_NOTES.md
# placeholder: NEXT RELEASE
# language: auto # node (package.json) auto-detected; else generic (.version)
# tag-prefix: v
# create-release: true
# token: ${{ github.token }} # creates the GitHub Release