mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-11 17:10:17 +00:00
ci: skip reverted commits in release notes, publish tagged snaps to stable (#39657)
Release notes: revert commits and the commits they revert are now left out of the git-cliff changelog. A step before git-cliff finds commits whose subject starts with "revert", reads the PR numbers on their revert lines, and writes both SHAs to `.cliffignore`. Snap: since the move from Launchpad to GitHub Actions, every build was uploaded to `latest/edge`, including the stable-grade build that `part-gitea-pull.sh` makes for an unreleased tag. Launchpad used to release those builds to candidate and stable automatically. Without that, v28.0.0 had to be promoted by hand and v28.1.0 stayed in edge. Stable-grade snaps now go to `latest/stable` and `latest/candidate`; main builds still go to edge. Candidate has to be updated too because the pull script compares against it. --------- Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
1 parent
02da29f2da
commit
8a553332f7
4 files changed
+33
-6
No files matched your search
@@ -37,8 +37,15 @@ jobs:
|
||||
# retry snapcraft uploads which can be flaky
|
||||
- name: Publish snap
|
||||
run: |
|
||||
# part-gitea-pull.sh decides what is built, see the comments there:
|
||||
# * grade devel (main or a prerelease tag) goes to latest/edge
|
||||
# * grade stable (a new release tag) goes to latest/stable, and to latest/candidate which marks it as released
|
||||
channel=latest/edge
|
||||
if unsquashfs -cat "$SNAP" meta/snap.yaml | grep -qx 'grade: stable'; then
|
||||
channel=latest/stable,latest/candidate
|
||||
fi
|
||||
for attempt in 1 2 3 4 5; do
|
||||
snapcraft upload "$SNAP" --release latest/edge && exit 0
|
||||
snapcraft upload "$SNAP" --release "$channel" && exit 0
|
||||
echo "::warning::snap upload attempt $attempt failed, retrying in 15s"
|
||||
sleep 15
|
||||
done
|
||||
|
||||
@@ -76,6 +76,10 @@ jobs:
|
||||
run: |
|
||||
previous=$(git tag --list --sort=-v:refname | grep -xE 'v[0-9]+\.[0-9]+\.[0-9]+' | grep -A1 -xF "$GITHUB_REF_NAME" | tail -1) # highest stable version below this one
|
||||
echo "range=$previous..$GITHUB_SHA" >> "$GITHUB_OUTPUT"
|
||||
- name: skip reverts and reverted commits in changelog
|
||||
env:
|
||||
RANGE: ${{ steps.range.outputs.range }}
|
||||
run: ./tools/generate-cliffignore.sh "$RANGE" | sort -u > .cliffignore
|
||||
- uses: orhun/git-cliff-action@a9a95522b26fe6403f7bb24031f21fb573d0f5ff # v4.9.1
|
||||
with:
|
||||
args: --tag ${{ github.ref_name }} ${{ steps.range.outputs.range }}
|
||||
|
||||
Reference in new issue
Block a user