-
Notifications
You must be signed in to change notification settings - Fork 208
49 lines (48 loc) · 1.53 KB
/
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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release Version(minor,patch,preminor,prepatch)'
required: true
default: 'patch'
branch:
description: 'Release Branch(confirm release branch)'
required: true
default: 'main'
jobs:
release:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [16.14.0]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Pushing to the protected branch 'protected'
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
branch: ${{ github.event.inputs.branch }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache .pnpm-store
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install pnpm
run: curl -f https://get.pnpm.io/v6.14.js | node - add --global pnpm@6
- name: install dependency
run: pnpm install --filter=\!garfish-docs
- name: release
run: node ./scripts/release.js --version=${{ github.event.inputs.version }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: changelog
run: npx conventional-github-releaser -p angular
env:
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}