-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.97 KB
/
create_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
name: Create release
on:
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v4.1.0
with:
version: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache-dependency-path: package.json
- name: Install standard-version
run : pnpm i -g standard-version
- name: Config git
run: |
git config --global user.email "${{ github.event.sender.email }}"
git config --global user.name "${{ github.event.sender.login }}"
- name: Apply standard-version
run: standard-version -t "" --no-verify
- name: Get new version
id: version
run: echo "VERSION=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
- name: Fix packages
run: |
sudo apt-get install moreutils
jq '.version = "${{ steps.version.outputs.VERSION }}"' packages/nestjs-firebase-admin/package.json | sponge packages/nestjs-firebase-admin/package.json
- name: Commit release
run: |
git add .
git commit --no-verify -m "chore(release): ${{ steps.version.outputs.VERSION }}"
git checkout -b release/${{ steps.version.outputs.VERSION }}
git tag ${{ steps.version.outputs.VERSION }}
git push origin release/${{ steps.version.outputs.VERSION }}
git push --tags
- name: Create release PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--title "chore(release): ${{ steps.version.outputs.VERSION }}" \
--body "chore(release): ${{ steps.version.outputs.VERSION }}" \
--base master \
--head release/${{ steps.version.outputs.VERSION }} \
--label release