-
-
Notifications
You must be signed in to change notification settings - Fork 16
107 lines (87 loc) · 2.98 KB
/
release_artifacts.yml
File metadata and controls
107 lines (87 loc) · 2.98 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: refresh release artifacts
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- main
push:
branches:
- release-please--branches--main
permissions:
contents: read
concurrency:
group: release-artifacts-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
verify-generated-artifacts:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.event.pull_request.head.ref, 'release-please--branches--')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true
cache_dependency_path: frontend/pnpm-lock.yaml
package_json_file: frontend/package.json
- uses: actions/setup-node@v6
with:
node-version-file: ".tool-versions"
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
working-directory: frontend
- name: Refresh OpenAPI artifacts
run: |
make openapi
make openapi-client
- name: Assert generated artifacts are current
run: git diff --exit-code -- public/openapi.yaml frontend/src/api/generated
refresh-generated-artifacts:
if: github.event_name == 'push' && github.repository == 'html2rss/html2rss-web' && github.ref == 'refs/heads/release-please--branches--main' && github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true
cache_dependency_path: frontend/pnpm-lock.yaml
package_json_file: frontend/package.json
- uses: actions/setup-node@v6
with:
node-version-file: ".tool-versions"
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
working-directory: frontend
- name: Refresh OpenAPI artifacts
run: |
make openapi
make openapi-client
- name: Commit generated artifacts
run: |
if git diff --quiet -- public/openapi.yaml frontend/src/api/generated; then
echo "Generated artifacts already up to date"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add public/openapi.yaml frontend/src/api/generated
git commit -m "chore: refresh release artifacts"
git push