Skip to content

Commit 21c1e5c

Browse files
authored
Recreate the latest release at each master build, so its date and tag are current (#691)
* Move the latest tag on master builds, not a latest branch * Recreate the latest release at each master build so its date is the build's
1 parent 048f665 commit 21c1e5c

2 files changed

Lines changed: 33 additions & 8 deletions

File tree

‎.github/workflows/build-linux.yml‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,6 @@ jobs:
129129
make_latest: ${{ env.RELEASE == 'latest' && 'false' || 'legacy' }}
130130
files: projectGenerator-linux-gui.gz
131131

132-
- name: Update Latest Tag - DateTime
133-
uses: EndBug/latest-tag@latest
134-
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
135-
with:
136-
ref: latest
137-
description: Latest master build (copied to nightly every night)
138-
force-branch: true
139-
140132
# Ubuntu 22.04 build - older glibc baseline, covers users/distros that can't
141133
# run binaries linked against 24.04's newer glibc.
142134
build-linux-ubuntu22:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: latest-release
2+
3+
# a master push starts the builds, which upload to the "latest" release; recreate it first so
4+
# its date and tag are this commit's (the builds take minutes before they upload)
5+
on:
6+
push:
7+
branches:
8+
- master
9+
paths-ignore:
10+
- '**/README.md'
11+
12+
permissions:
13+
contents: write
14+
15+
concurrency:
16+
group: latest-release
17+
cancel-in-progress: false
18+
19+
jobs:
20+
latest-release:
21+
if: github.repository == 'openframeworks/projectGenerator'
22+
runs-on: ubuntu-latest
23+
env:
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
REPO: ${{ github.repository }}
26+
steps:
27+
- name: Recreate the latest release at this commit
28+
shell: bash
29+
run: |
30+
set -euo pipefail
31+
gh release delete latest --repo "$REPO" --cleanup-tag --yes || echo "no latest release yet"
32+
gh release create latest --repo "$REPO" --target "$GITHUB_SHA" --title latest --latest=false \
33+
--notes "Latest master build from ${GITHUB_SHA:0:7} (copied to nightly every night). Files are added as each platform finishes building."

0 commit comments

Comments
 (0)