diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-10-22 15:13:49 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-10-22 15:13:49 +0800 |
| commit | 9cc84b14b8805f964ee8772b44721c3ec1588f4e (patch) | |
| tree | 4088f09758b05f2349823080025453298d9afeee /.github/workflows | |
| download | aerocore-os-gamemode-news-9cc84b14b8805f964ee8772b44721c3ec1588f4e.tar.gz aerocore-os-gamemode-news-9cc84b14b8805f964ee8772b44721c3ec1588f4e.zip | |
feat: publish AeroCore game mode news
Provide public update announcements for AeroCore OS using the upstream
game mode news format.
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build-announcements.yml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/build-announcements.yml b/.github/workflows/build-announcements.yml new file mode 100644 index 0000000..17c2246 --- /dev/null +++ b/.github/workflows/build-announcements.yml @@ -0,0 +1,62 @@ +name: Build announcements.json + +on: + schedule: + - cron: '17 * * * *' + repository_dispatch: + types: [build-announcements] + workflow_dispatch: + inputs: + branch: + description: Target branch + required: true + type: choice + options: + - stable + - testing + - unstable + +permissions: + contents: write + +concurrency: + group: build-announcements-${{ github.event.client_payload.branch || github.event.inputs.branch }} + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Resolve target branch + id: target + env: + DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + INPUT_BRANCH: ${{ github.event.inputs.branch }} + run: | + BRANCH="${DISPATCH_BRANCH:-${INPUT_BRANCH:-stable}}" + case "$BRANCH" in + stable|testing|unstable) ;; + *) echo "::error::invalid or missing branch: '$BRANCH'"; exit 1 ;; + esac + echo "branch=$BRANCH" >> "$GITHUB_OUTPUT" + + - uses: actions/checkout@v4 + with: + ref: ${{ steps.target.outputs.branch }} + + - name: Build announcements.json + run: python3 .github/scripts/build-announcements.py + env: + RELEASE_BRANCH: ${{ steps.target.outputs.branch }} + SOURCE_REPO: AeroCore-IO/AeroCore-OS + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TZ: UTC + + - name: Commit if changed + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add announcements.json docs/ + git diff --cached --quiet || git commit -m "chore: rebuild game mode announcements" -m "Refresh Steam update notes from AeroCore OS releases." + git pull --rebase + git push |
