-
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.68 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
name: Release
on:
push:
branches: [main]
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Run Release Please
uses: googleapis/release-please-action@v4
id: release
with:
config-file: .release-please/config.json
manifest-file: .release-please/manifest.json
# Si la PR (pull request) a été créée ou modifiée : formatter les fichiers
# modifiés par release-please, car ils ne respectent plus le formatage de
# Prettier (via Metalint).
# https://github.com/googleapis/release-please/issues/1802
- name: Checkout repository
if: ${{ steps.release.outputs.pr }}
uses: actions/checkout@v4
with:
ref: ${{ fromJson(steps.release.outputs.pr).headBranchName }}
- name: Configure Git user
if: ${{ steps.release.outputs.pr }}
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Setup Node.js
if: ${{ steps.release.outputs.pr }}
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
if: ${{ steps.release.outputs.pr }}
run: npm ci
- name: Format files
if: ${{ steps.release.outputs.pr }}
run: >
npm run lint:fix -- .release-please/manifest.json CHANGELOG.md
package.json package-lock.json src/manifest.json
- name: Commit and push
if: ${{ steps.release.outputs.pr }}
run: |
git commit --all --message 'chore: format files'
git push