-
-
Notifications
You must be signed in to change notification settings - Fork 579
56 lines (50 loc) · 1.4 KB
/
release-pull-request.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
name: Release Pull Request
on:
workflow_dispatch:
inputs:
version:
type: choice
description: "Release Version (major|minor|patch|snapshot)"
required: true
default: "patch"
options:
- major
- minor
- patch
- snapshot
prerelease:
type: choice
description: "Pre Release Tag (alpha|beta|rc)"
required: true
default: "none"
options:
- none
- alpha
- beta
- rc
schedule:
# 08:00 AM Beijing Time on every Tuesday
- cron: "0 0 * * 2"
jobs:
release:
name: Create Release Pull Request
runs-on: ubuntu-latest
if: github.repository_owner == 'web-infra-dev'
steps:
- name: Checkout Main Branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Pnpm Cache
uses: ./.github/actions/pnpm-cache
- name: Create Release Pull Request
# https://github.com/rspack-contrib/rspack-action
uses: rspack-contrib/rspack-action@rspack
with:
version: node ./x version ${{inputs.version || 'patch'}} --pre ${{inputs.prerelease || ''}}
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}