-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.31 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
name: Release
on:
push:
branches:
- main
env:
NODE_VERSION: 16
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.prep-release.outputs.releases_created }}
prs_exist: ${{ steps.prep-release.outputs.prs || 'false' }}
steps:
- name: Prep release
id: prep-release
uses: google-github-actions/release-please-action@v3
with:
command: manifest
update-lockfile:
name: Update release PR with lockfile updates
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.releases_created != 'true' && needs.release-please.outputs.prs_exist != 'false'
steps:
- uses: actions/checkout@v3
with:
ref: release-please--branches--main
fetch-depth: 2
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Update package-lock.json
run: npm install --no-audit --no-fund --ignore-scripts --package-lock-only
- name: Merge changes with last commit
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit --amend --no-edit
git push -f