-
Notifications
You must be signed in to change notification settings - Fork 11k
72 lines (62 loc) · 1.63 KB
/
new-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
name: Start new release
on:
workflow_dispatch:
inputs:
name:
type: choice
description: Release type
default: next
required: true
options:
- next
- patch
- publish
base-ref:
description: Base version
default: master
required: false
env:
HUSKY: 0
jobs:
new-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CI_PAT }}
- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
cache-modules: true
install: true
- uses: dtinth/setup-github-actions-caching-for-turbo@v1
- name: Build packages
run: yarn build
- name: Start next release
if: ${{ github.event.inputs.name == 'next' }}
uses: ./packages/release-action
with:
action: bump
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_PAT }}
- name: Start patch release
if: ${{ github.event.inputs.name == 'patch' }}
uses: ./packages/release-action
with:
action: patch
base-ref: ${{ github.event.inputs.base-ref }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_PAT }}
- name: Publish release
if: ${{ github.event.inputs.name == 'publish' }}
uses: ./packages/release-action
with:
action: publish
base-ref: ${{ github.event.inputs.base-ref }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CI_PAT }}