Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Blocker: yes. Fix this before the server-monitoring work starts. The repository is public. Thus, GitHub Actions on standard GitHub-hosted runners are free for it, and CI does not use the organization's minutes.
Defect
- CI operates only when you push a tag. It only builds the binaries.
- Pull requests get no vet, lint, test or vulnerability checks. The tests from bug: Commands exit with code 0 when they fail, and show incorrect error text #2 do not run automatically.
- The workflow uses
actions/create-release@v1andactions/upload-release-asset@v1. GitHub archived these actions. actions/checkout@v3andactions/setup-go@v4are old versions. The current versions are v7.- The release names are
Release refs/tags/vX.Y.Z. - The releases do not include checksums.
- A tag with a pre-release suffix (for example
v0.2.0-rc.1) becomes a full release. Then/releases/latestreturns it, and installed CLIs update to it.
Cost
- The code will change very much. At this time, no automatic check examines a change before the merge.
- Archived actions get no maintenance. A change on GitHub can stop the release process at any time.
- Without checksums, the installer and the updater cannot examine the downloads (refer to enhancement: Examine release downloads with checksums #9).
- A test tag can send an unfinished version to all servers.
Benefit of the fix
- Each pull request and each push to
developandmaingets the same checks asmake check. - The release process uses maintained tools only.
- Each release includes checksums.
- Pre-release tags do not reach the installed CLIs.
- Developers can publish a dev pre-release of a branch and test it on real servers before the merge.
Fix
- Add a CI workflow for push and pull request events on
developandmain. The workflow runsmake check(enhancement: Add a Makefile for the build, test, lint and release commands #16) andmake release. - In the release workflow, use
actions/checkout@v7,actions/setup-go@v7andgh release create.ghis on the runner. Thus, the workflow needs no third-party action. - Before the release, run
make check. Then runmake releasewith the tag asVERSION. - Upload the two tarballs and
checksums.txtto each release. mainis the release branch. Make sure that a tag without a pre-release suffix is onmain. If it is not onmain, stop the release.- If the tag has a pre-release suffix, create a pre-release. A pre-release tag can come from any branch.
- Add
make dev-release. It tags the current commit as<next minor version>-dev.<short commit>(for examplev0.2.0-dev.1a2b3c4) and pushes the tag. It refuses uncommitted changes and commits that are not pushed. It also refuses a commit if its release workflow would publish the tag as a full release.
The test harness (a fake docker script on PATH) is already in #2.
Caution
CAUTION: DO NOT CHANGE THE NAMES OR THE CONTENTS OF THE RELEASE ASSETS. IF YOU CHANGE THEM, THE INSTALLED CLIS CANNOT RUN fly update.
- The updater in v0.1.1 accepts only assets with the name
fly-linux-<arch>.tar.gz. - Each asset must contain a binary with the name
fly-linux-<arch>. - The updater compares tags as text. Thus, each new tag must sort after
v0.1.1as text. - Keep these rules until all servers use the corrected updater (bug(self-update): correct the version comparison, the HTTP errors and the binary replacement #8).
Completion checks
- Pull requests show the check results.
- A tag push makes a release with the two tarballs and
checksums.txt. - The asset names do not change.
- A tag on a commit that is not on
maindoes not make a release. - A tag with a pre-release suffix makes a pre-release.
-
make dev-releaseon a branch makes a pre-release, and/releases/latestdoes not change.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
ci: publish dev pre-releases (vX.Y.0-dev.<sha>) from any branch
ci: run make check on every change and publish releases with gh
ci: publish dev pre-releases (vX.Y.0-dev.<sha>) from any branch
build: add a Makefile for the build, test, lint and release commands (#…
ci: run make check on every change and publish releases with gh (#25)
[-]CI: add checks for pull requests and replace the archived release actions[/-][+]enhancement: CI: add checks for pull requests and replace the archived release actions[/+][-]enhancement: CI: add checks for pull requests and replace the archived release actions[/-][+]enhancement(ci): add checks for pull requests and replace the archived release actions[/+]