-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (56 loc) · 2.48 KB
/
Copy pathrcheevos-update.yml
File metadata and controls
71 lines (56 loc) · 2.48 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
name: Update rcheevos
on:
schedule:
- cron: "0 6 * * *" # 06:00 UTC every day
workflow_dispatch:
permissions:
contents: write
id-token: write
concurrency:
group: rcheevos-release-check
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Configure git
uses: qoomon/actions--setup-git@v1.1.1
- name: Detect latest rcheevos tag
id: detect
run: .github/scripts/find-rcheevos-release.sh
- name: Stop if already up to date
run: echo "rcheevos is already up to date."
if: steps.detect.outputs.latest_commit == steps.detect.outputs.current_commit || steps.detect.outputs.latest_tag == ''
- name: Update submodule to latest tag
run: .github/scripts/update-rcheevos-submodule.sh "${{ steps.detect.outputs.latest_tag }}"
if: steps.detect.outputs.latest_commit != steps.detect.outputs.current_commit && steps.detect.outputs.latest_tag != ''
- name: Install Emscripten
uses: numworks/setup-emscripten@latest
if: steps.detect.outputs.latest_commit != steps.detect.outputs.current_commit && steps.detect.outputs.latest_tag != ''
- name: Install dependencies
if: steps.detect.outputs.latest_commit != steps.detect.outputs.current_commit && steps.detect.outputs.latest_tag != ''
run: bun install --frozen-lockfile
- name: Build package
if: steps.detect.outputs.latest_commit != steps.detect.outputs.current_commit && steps.detect.outputs.latest_tag != ''
run: bun run build
- name: Bump package version
run: bunx npm version patch -f
if: steps.detect.outputs.latest_commit != steps.detect.outputs.current_commit && steps.detect.outputs.latest_tag != ''
- name: Publish package
run: bun publish
if: steps.detect.outputs.latest_commit != steps.detect.outputs.current_commit && steps.detect.outputs.latest_tag != ''
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }} # token expires March 13, 2025. update to OIDC before then
- name: Push changes
run: git push
if: steps.detect.outputs.latest_commit != steps.detect.outputs.current_commit && steps.detect.outputs.latest_tag != ''