-
-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (48 loc) · 2.15 KB
/
update-releases-summary.yaml
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
name: Update GameMaker Releases Summary
on:
workflow_dispatch:
push:
tags:
- "@bscotch/gamemaker-releases@*"
schedule:
# https://crontab.guru/#22_13,17,20,22_*_*_1-5
- cron: '22 13,17,20,22 * * 1-5'
permissions:
contents: write
jobs:
update:
name: Update Summary
runs-on: ubuntu-latest
env:
GIST_ID: ff8bf0f892f40ca353a94103015b6493
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable
- run: pnpm install --filter=@bscotch/gamemaker-releases...
- name: Download Latest (to minimize requests needed)
continue-on-error: true
run: mkdir -p tmp && cd tmp && gh gist clone $GIST_ID && cd $GIST_ID && cp * ../../packages/releases/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Store Latest Summary Checksum
run: echo "OLD_SUMMARY_CHECKSUM=${{hashFiles('packages/releases/releases-summary.json')}}" >> $GITHUB_ENV
- name: Build
run: pnpm turbo run build --only --filter=gamemaker-releases...
- name: Compute New Summary
# This script adds the env var `LATEST_RELEASE`
run: node scripts/update-releases-summary.mjs
- name: Store New Summary Checksum
run: echo "NEW_SUMMARY_CHECKSUM=${{hashFiles('packages/releases/releases-summary.json')}}" >> $GITHUB_ENV
- name: Report
run: echo ${{env.LATEST_RELEASE}} ${{env.OLD_SUMMARY_CHECKSUM}} ${{ENV.NEW_SUMMARY_CHECKSUM}} && ls packages/releases/release*.json
- name: Create New Release
# if: ${{env.OLD_SUMMARY_CHECKSUM != env.NEW_SUMMARY_CHECKSUM}}
run: cd packages/releases && gh gist edit $GIST_ID -a release-notes-cache.json -a releases-summary.json
env:
GITHUB_TOKEN: ${{ secrets.GAMEMAKER_RELEASES_GIST_KEY }}
# run: gh release create --title "GameMaker Releases Summary v${{env.LATEST_RELEASE}}" releases-summary@${{env.LATEST_RELEASE}} packages/releases/releases-summary.json#GameMakerReleases packages/releases/release-notes-cache.json#NotesCache
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}