Skip to content
Closed
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
20 changes: 4 additions & 16 deletions .github/workflows/release-prepare.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Release Prepare

# Prepares, but never publishes, a release for class-2 repositories and the
# named Zi exception (decisions/0007-release-publication-flow.md). On every
# Prepares, but never publishes, a release for class-2 repositories
# (decisions/0007-release-publication-flow.md). On every
# push to the default branch it computes the next semantic version from
# Conventional Commits since the last tag, drafts a changelog with GitHub
# Models (falling back to a grouped commit list), and opens or updates a single
Expand Down Expand Up @@ -36,11 +36,6 @@ on:
required: false
type: string
default: "release-proposal"
signed_tag:
description: Emit a signed annotated tag command in the proposal.
required: false
type: boolean
default: false
outputs:
version:
description: >
Expand Down Expand Up @@ -241,18 +236,11 @@ jobs:
PREVIOUS_TAG: ${{ steps.semver.outputs.previous-tag }}
TAG_PREFIX: ${{ inputs.tag-prefix || 'v' }}
PROPOSAL_LABEL: ${{ inputs.proposal-label || 'release-proposal' }}
SIGNED_TAG: ${{ inputs.signed_tag }}
AI_RESPONSE_FILE: ${{ steps.ai.outputs.response-file }}
run: |
set -euo pipefail
dir="${RUNNER_TEMP}/release-prepare"
tag="${TAG_PREFIX}${VERSION}"
tag_flag="-a"
tag_kind="annotated"
if [ "$SIGNED_TAG" = "true" ]; then
tag_flag="-s"
tag_kind="signed annotated"
fi

changelog="${dir}/fallback.md"
if [ -n "${AI_RESPONSE_FILE}" ] && [ -s "${AI_RESPONSE_FILE}" ]; then
Expand All @@ -278,12 +266,12 @@ jobs:
echo
echo "## To publish"
echo
echo "Per [ADR 0007](https://github.com/z-shell/.github/blob/main/decisions/0007-release-publication-flow.md) the ${tag_kind} tag is the publication boundary. Review and adjust the version if needed, then:"
echo "Per [ADR 0007](https://github.com/z-shell/.github/blob/main/decisions/0007-release-publication-flow.md) the annotated tag is the publication boundary. Review and adjust the version if needed, then:"
echo
echo '```sh'
echo "git switch ${GITHUB_REF_NAME} && git pull --ff-only"
echo "# bump any in-repo version metadata first, if this repository has it"
echo "git tag ${tag_flag} ${tag} -m ${tag}"
echo "git tag -a ${tag} -m ${tag}"
echo "git push origin ${tag}"
echo '```'
echo
Expand Down
Loading