Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- id: green
run: |
commit="$GITHUB_SHA"
label="$CHANT_RELEASE_LABEL"; if [ "$label" = auto ]; then rc=0; git ls-remote --exit-code --heads origin chant/lifecycle >/dev/null || rc=$?; if [ "$rc" = 0 ]; then git fetch origin chant/lifecycle:chant/lifecycle; elif [ "$rc" != 2 ]; then exit "$rc"; fi; next="$(npx --yes @intentius/chant@0.124.104 release next --at "$commit" --json)" || { echo "release next found no label for $commit, so no release is cut: $next" >&2; exit 1; }; label="$(printf '%s' "$next" | node -e 'const f=process.argv[1];const t=f?require("fs").readFileSync(f,"utf8"):require("fs").readFileSync(0,"utf8");const d=JSON.parse(t);process.stdout.write(String(d.label??""))')"; fi
label="$CHANT_RELEASE_LABEL"; if [ "$label" = auto ]; then rc=0; git ls-remote --exit-code --heads origin chant/lifecycle >/dev/null || rc=$?; if [ "$rc" = 0 ]; then git fetch origin chant/lifecycle:chant/lifecycle; elif [ "$rc" != 2 ]; then exit "$rc"; fi; next="$(npx --yes @intentius/chant@0.124.105 release next --at "$commit" --json)" || { echo "release next found no label for $commit, so no release is cut: $next" >&2; exit 1; }; label="$(printf '%s' "$next" | node -e 'const f=process.argv[1];const t=f?require("fs").readFileSync(f,"utf8"):require("fs").readFileSync(0,"utf8");const d=JSON.parse(t);process.stdout.write(String(d.label??""))')"; fi
echo "commit=$commit" >> "$GITHUB_OUTPUT"
echo "label=$label" >> "$GITHUB_OUTPUT"
cut:
Expand Down Expand Up @@ -71,17 +71,18 @@ jobs:
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
with:
platforms: "arm64"
- run: npx --yes @intentius/chant@0.124.105 release doctor --from cut
- name: goreleaser v2.19.0
run: "mkdir -p \"$RUNNER_TEMP/goreleaser\" && curl -fsSL -o \"$RUNNER_TEMP/goreleaser/goreleaser.tar.gz\" https://github.com/goreleaser/goreleaser/releases/download/v2.19.0/goreleaser_Linux_x86_64.tar.gz && echo \"ebc3194ad1d1b1787614405285a0039665cd4c5bd3305215a1b201600f90630b $RUNNER_TEMP/goreleaser/goreleaser.tar.gz\" | sha256sum -c - && tar -xzf \"$RUNNER_TEMP/goreleaser/goreleaser.tar.gz\" -C \"$RUNNER_TEMP/goreleaser\" goreleaser && echo \"CHANT_GORELEASER=$RUNNER_TEMP/goreleaser/goreleaser\" >> \"$GITHUB_ENV\""
- run: git fetch origin 'refs/tags/ci/*:refs/tags/ci/*'
- run: rc=0; git ls-remote --exit-code --heads origin chant/lifecycle >/dev/null || rc=$?; if [ "$rc" = 0 ]; then git fetch origin chant/lifecycle:chant/lifecycle; elif [ "$rc" != 2 ]; then exit "$rc"; fi
- run: |
git config user.name "chant release"
git config user.email "chant-release@localhost"
npx --yes @intentius/chant@0.124.104 release cut "$CHANT_RELEASE_LABEL" --at "$CHANT_RELEASE_COMMIT" --yes --json > "$RUNNER_TEMP/chant-cut.json"
npx --yes @intentius/chant@0.124.105 release cut "$CHANT_RELEASE_LABEL" --at "$CHANT_RELEASE_COMMIT" --yes --json > "$RUNNER_TEMP/chant-cut.json"
tag="$(node -e 'const f=process.argv[1];const t=f?require("fs").readFileSync(f,"utf8"):require("fs").readFileSync(0,"utf8");const d=JSON.parse(t);process.stdout.write(String(d.tag?.name??""))' "$RUNNER_TEMP/chant-cut.json")"
if [ -n "$tag" ]; then git push origin "refs/tags/$tag"; fi
- run: npx --yes @intentius/chant@0.124.104 release artifacts "$CHANT_RELEASE_LABEL" --no-build -o "$RUNNER_TEMP/chant-release-artifacts"
- run: npx --yes @intentius/chant@0.124.105 release artifacts "$CHANT_RELEASE_LABEL" --no-build -o "$RUNNER_TEMP/chant-release-artifacts"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: chant-release-artifacts
Expand Down Expand Up @@ -131,11 +132,11 @@ jobs:
with:
name: chant-release-images
path: build/images
- run: npx --yes @intentius/chant@0.124.104 release images "$CHANT_RELEASE_LABEL" --no-build -o "$RUNNER_TEMP/chant-release-digests.json"
- run: npx --yes @intentius/chant@0.124.105 release images "$CHANT_RELEASE_LABEL" --no-build -o "$RUNNER_TEMP/chant-release-digests.json"
- run: echo "CHANT_RELEASE_DIGESTS=$RUNNER_TEMP/chant-release-digests.json" >> "$GITHUB_ENV"
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: chant-release-artifacts
path: ${{ runner.temp }}/chant-release-artifacts
- run: npx --yes @intentius/chant@0.124.104 release artifacts "$CHANT_RELEASE_LABEL" --from "$RUNNER_TEMP/chant-release-artifacts"
- run: npx --yes @intentius/chant@0.124.104 release publish "$CHANT_RELEASE_LABEL" --yes
- run: npx --yes @intentius/chant@0.124.105 release artifacts "$CHANT_RELEASE_LABEL" --from "$RUNNER_TEMP/chant-release-artifacts"
- run: npx --yes @intentius/chant@0.124.105 release publish "$CHANT_RELEASE_LABEL" --yes
8 changes: 0 additions & 8 deletions Dockerfile.goreleaser

This file was deleted.

4 changes: 2 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ read as the release history.
`release.yml` is generated: change `chant.config.json`, then regenerate it with

```sh
npx --yes @intentius/chant@0.124.104 release workflow --force
npx --yes @intentius/chant@0.124.105 release workflow --force
```

## Steps
Expand All @@ -32,7 +32,7 @@ npx --yes @intentius/chant@0.124.104 release workflow --force
2. **Check the label** (optional). From a clean, up-to-date `main`:

```sh
npx --yes @intentius/chant@0.124.104 release next # the label the commits give
npx --yes @intentius/chant@0.124.105 release next # the label the commits give
```

3. **Start the release:**
Expand Down
3 changes: 1 addition & 2 deletions chant.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
],
"workflow": {
"trigger": "dispatch",
"file": ".github/workflows/release.yml",
"doctor": false
"file": ".github/workflows/release.yml"
}
}
}
Loading