-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (55 loc) · 1.52 KB
/
release.yaml
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
name: "Release"
on:
push:
branches:
- "beta"
- "alpha"
workflow_dispatch:
inputs:
draft:
type: boolean
description: "Draft release"
default: false
release_type:
type: choice
description: "Release type"
default: "auto"
options:
- "auto"
- "patch"
- "minor"
- "major"
jobs:
publish:
name: "Publish"
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: "Checkout the repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Setup pnpm"
uses: pnpm/action-setup@v4
- name: "Setup node"
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "pnpm"
- name: "Install dependencies"
run: pnpm install
- name: "Release Package 📦"
run: pnpm dlx @jcwillox/semantic-release-config
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEMANTIC_RELEASE_GITHUB_DRAFT: ${{ inputs.draft }}
SEMANTIC_RELEASE_FORCE_RELEASE: ${{ inputs.release_type }}
SEMANTIC_RELEASE_CMD_PREPARE: "pnpm run build"
SEMANTIC_RELEASE_CMD_SUCCESS: |
git tag -f "v${nextRelease.version.split('.')[0]}"
git push origin "v${nextRelease.version.split('.')[0]}" --tags --force
SEMANTIC_RELEASE_GIT_ASSETS: "dist/index.js"