Add nightly release tag workflow and adapt CI for moving tags#2223
Open
petermm wants to merge 1 commit intoatomvm:release-0.7from
Open
Add nightly release tag workflow and adapt CI for moving tags#2223petermm wants to merge 1 commit intoatomvm:release-0.7from
petermm wants to merge 1 commit intoatomvm:release-0.7from
Conversation
Add a scheduled workflow (nightly-release-tags.yaml) that force-updates a `release-0.7-latest` annotated tag to the tip of the release-0.7 branch using a dedicated PAT (RELEASE_TAG_PUSH_TOKEN) so downstream release workflows are triggered. The tag is only moved when the branch HEAD has actually changed, avoiding unnecessary rebuilds. Adapt existing release workflows for `*-latest` tags: - Publish as prerelease instead of draft, with asset overwrite enabled. - Skip CodeQL analysis only for nightly tags, not for branches that happen to end in "-latest". - Exclude `*-latest` tags from non-release CI workflows via tags-ignore. - Narrow publish-docs tag filter to `v*` to prevent docs deployment on nightly tag pushes. Forks without the token secret skip nightly tag updates gracefully; the official repository fails fast if the secret is missing. Amp-Thread-ID: https://ampcode.com/threads/T-019d0f7e-bb56-7572-a7e0-ca9fb71d69a3 Signed-off-by: Peter M <petermm@gmail.com>
5ec03eb to
17b15a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ci: add nightly latest-tag release builds
Summary
This adds nightly release builds using moving
*-latesttags.The new workflow updates nightly tags on a schedule.
Versioned release tags continue to behave like normal releases, while moving nightly tags are allowed to refresh assets in place.
What this changes
main->main-latestrelease-X.Y-latest*-latestbuilds as prereleases instead of drafts*-latesttagsBranch rollout
This should be landed on release-0.7 branch first, then forward-ported to
main.Required setup
This workflow requires a repository secret named
RELEASE_TAG_PUSH_TOKEN.Why:
GITHUB_TOKENis intentionally not used for thisRecommended token:
atomvm/AtomVMContents: Read and writeCreate a dedicated fine-grained PAT on GitHub:
SettingsDeveloper settingsPersonal access tokensFine-grained tokensGenerate new tokenAtomVM nightly release tagsatomvmOnly select repositoriesAtomVMContents: Read and writeStore the secret with
gh:gh secret set RELEASE_TAG_PUSH_TOKEN --repo atomvm/AtomVMPaste the PAT when prompted.
Verify:
Delete the secret if needed:
Notes:
GITHUB_TOKENatomvmorganization requires approval for fine-grained PATs, an org owner may need to approve it before it worksatomvm/AtomVMSchedule
Nightly tags run at:
17 2 * * *UTC02:17 UTCevery dayFirst run / verification
After the workflow file is on the default branch and the secret is configured, trigger the first run manually:
Then watch it with:
Expected result:
main-latestandrelease-0.7-latestmove to the latest branch headsManual cleanup
If a nightly release ends up with stale assets and you want to reset it manually, delete the GitHub release and the tag, then rerun the nightly workflow.
Delete the release:
Delete the remote tag:
Or with the GitHub API via
gh:After cleanup, rerun:
Notes
RELEASE_TAG_PUSH_TOKENis a hard failureRELEASE_TAG_PUSH_TOKENonly warns and skips, to make testing easierworkflow_dispatchonly works once the workflow file exists on the default branchAmp-Thread-ID: https://ampcode.com/threads/T-019d0f7e-bb56-7572-a7e0-ca9fb71d69a3
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later