-
Notifications
You must be signed in to change notification settings - Fork 2.2k
58 lines (49 loc) · 1.65 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
50
51
52
53
54
55
56
57
58
name: Release
on:
workflow_dispatch:
branches:
- trunk
permissions: {}
jobs:
release:
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# This makes action fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
key: reaction-v6-node-modules-${{ hashFiles('package.json') }}-${{ hashFiles('pnpm-lock.yaml') }}
path: "**/node_modules"
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: "18.10.0"
- name: Install pnpm
run: npm i -g [email protected]
- name: Install Dependencies
run: pnpm install --ignore-scripts
- name: Create Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update pnpm-lock.yaml
run: pnpm install --no-frozen-lockfile --lockfile-only
- name: Commit new pnpm-lock.yaml
uses: EndBug/add-and-commit@v9
with:
add: "pnpm-lock.yaml"
message: "feat: update pnpm-lock"
new_branch: changeset-release/trunk
committer_name: github-actions[bot]
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
pathspec_error_handling: ignore
commit: --signoff