-
Notifications
You must be signed in to change notification settings - Fork 4
feat(ci): add basic release workflows #665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,168 @@ | ||||||||||||||||||||||||||||||||||||||||
| name: Prepare Release Branch | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||||
| version: | ||||||||||||||||||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||||||||||||||||||
| The release version in <Major>.<minor> format. | ||||||||||||||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||
| next-version: | ||||||||||||||||||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||||||||||||||||||
| The <Major>.<minor> version that will be used for the next | ||||||||||||||||||||||||||||||||||||||||
| release. | ||||||||||||||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||
| rust-version: | ||||||||||||||||||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||||||||||||||||||
| The Rust version that will be used for the new release branch. | ||||||||||||||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||
| dry-run: | ||||||||||||||||||||||||||||||||||||||||
| description: Do not push anything | ||||||||||||||||||||||||||||||||||||||||
| default: true | ||||||||||||||||||||||||||||||||||||||||
| type: boolean | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||
| validate-version: | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
| - name: Validate release versions | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| function validate_version() { | ||||||||||||||||||||||||||||||||||||||||
| name="$1" | ||||||||||||||||||||||||||||||||||||||||
| version="$2" | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| if [[ ! "$version" =~ ^([[:digit:]]+)\.([[:digit:]]+)$ ]] ; then | ||||||||||||||||||||||||||||||||||||||||
| echo >&2 "Invalid $name $version. The expected format is <Major>.<minor>" | ||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| validate_version "version" ${{ inputs.version }} | ||||||||||||||||||||||||||||||||||||||||
| validate_version "next-version" ${{ inputs.next-version }} | ||||||||||||||||||||||||||||||||||||||||
| validate_version "rust-version" ${{ inputs.rust-version }} | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| prepare-release-branch: | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||||||||||||||||||||||
| needs: | ||||||||||||||||||||||||||||||||||||||||
| - validate-version | ||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| submodules: false | ||||||||||||||||||||||||||||||||||||||||
| ref: main | ||||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Initialize mandatory git config | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| git config user.name "${{ github.event.sender.login }}" | ||||||||||||||||||||||||||||||||||||||||
| git config user.email noreply@github.com | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Create internal tag and release-${{ inputs.version }} branch | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| git checkout main | ||||||||||||||||||||||||||||||||||||||||
| git pull --ff-only | ||||||||||||||||||||||||||||||||||||||||
| git tag "${{ inputs.version }}.x" | ||||||||||||||||||||||||||||||||||||||||
| git checkout -b "release-${{ inputs.version }}" | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Push internal tag and release-${{ inputs.version }} branch | ||||||||||||||||||||||||||||||||||||||||
| if: ${{ ! inputs.dry-run }} | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| git push origin "${{ inputs.version }}.x" | ||||||||||||||||||||||||||||||||||||||||
| git push --set-upstream origin "release-${{ inputs.version }}" | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| pin-rust-version: | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||||||||||||||||||||||
| needs: | ||||||||||||||||||||||||||||||||||||||||
| - validate-version | ||||||||||||||||||||||||||||||||||||||||
| - prepare-release-branch | ||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| submodules: false | ||||||||||||||||||||||||||||||||||||||||
| ref: release-${{ inputs.version }} | ||||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+82
to
+86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dry runs cannot reach this checkout.
Possible fix pin-rust-version:
runs-on: ubuntu-24.04
needs:
- validate-version
- prepare-release-branch
steps:
- uses: actions/checkout@v6
with:
submodules: false
- ref: release-${{ inputs.version }}
+ ref: main
token: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }}
+
+ - name: Switch to release branch
+ run: |
+ if [[ "${{ inputs.dry-run }}" == "true" ]]; then
+ git checkout -b "release-${{ inputs.version }}"
+ else
+ git fetch origin "release-${{ inputs.version }}:release-${{ inputs.version }}"
+ git checkout "release-${{ inputs.version }}"
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Pin Rust version | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| sed -i -e "s/^RUST_VERSION .*/RUST_VERSION ?= ${{ inputs.rust-version }}/" \ | ||||||||||||||||||||||||||||||||||||||||
| constants.mk | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Update fact version | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| sed -i \ | ||||||||||||||||||||||||||||||||||||||||
| -e "/^version = / s/\".*\"/\"${{ inputs.version}}.0\"/" \ | ||||||||||||||||||||||||||||||||||||||||
| fact/Cargo.toml | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| cargo update -p fact | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Print git diff for validation | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| git diff | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Create Pull Request | ||||||||||||||||||||||||||||||||||||||||
| if: ${{ ! inputs.dry-run }} | ||||||||||||||||||||||||||||||||||||||||
| uses: peter-evans/create-pull-request@v8 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| token: '${{ secrets.RHACS_BOT_GITHUB_TOKEN }}' | ||||||||||||||||||||||||||||||||||||||||
| commit-message: 'chore: pin Rust version and update fact version' | ||||||||||||||||||||||||||||||||||||||||
| committer: '${{ secrets.RHACS_BOT_GITHUB_USERNAME }} <${{ secrets.RHACS_BOT_GITHUB_EMAIL }}>' | ||||||||||||||||||||||||||||||||||||||||
| author: '${{ secrets.RHACS_BOT_GITHUB_USERNAME }} <${{ secrets.RHACS_BOT_GITHUB_EMAIL }}>' | ||||||||||||||||||||||||||||||||||||||||
| branch: chore/pin-rust-update-version-${{ inputs.version }} | ||||||||||||||||||||||||||||||||||||||||
| signoff: false | ||||||||||||||||||||||||||||||||||||||||
| delete-branch: true | ||||||||||||||||||||||||||||||||||||||||
| title: 'chore: pin Rust version and update fact version' | ||||||||||||||||||||||||||||||||||||||||
| body: | | ||||||||||||||||||||||||||||||||||||||||
| Pin Rust version to ${{ inputs.rust-version }} and update fact to version ${{ inputs.version }} | ||||||||||||||||||||||||||||||||||||||||
| team-reviewers: | | ||||||||||||||||||||||||||||||||||||||||
| collector-team | ||||||||||||||||||||||||||||||||||||||||
| draft: false | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| update-version: | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||||||||||||||||||||||
| needs: | ||||||||||||||||||||||||||||||||||||||||
| - validate-version | ||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+123
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don’t advance
Possible fix update-version:
runs-on: ubuntu-24.04
needs:
- validate-version
+ - prepare-release-branch📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| submodules: false | ||||||||||||||||||||||||||||||||||||||||
| ref: main | ||||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Update CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| sed -i \ | ||||||||||||||||||||||||||||||||||||||||
| -e "s/^## Next/&\n\n## ${{ inputs.version }}.0/" \ | ||||||||||||||||||||||||||||||||||||||||
| CHANGELOG.md | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Update fact version | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| sed -i \ | ||||||||||||||||||||||||||||||||||||||||
| -e "/^version = / s/\".*\"/\"${{ inputs.next-version }}.0-dev\"/" \ | ||||||||||||||||||||||||||||||||||||||||
| fact/Cargo.toml | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| cargo update -p fact | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Print git diff for validation | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| git diff | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Create Pull Request | ||||||||||||||||||||||||||||||||||||||||
| if: ${{ ! inputs.dry-run }} | ||||||||||||||||||||||||||||||||||||||||
| uses: peter-evans/create-pull-request@v8 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| token: '${{ secrets.RHACS_BOT_GITHUB_TOKEN }}' | ||||||||||||||||||||||||||||||||||||||||
| commit-message: 'chore: update CHANGELOG.md and fact version' | ||||||||||||||||||||||||||||||||||||||||
| committer: '${{ secrets.RHACS_BOT_GITHUB_USERNAME }} <${{ secrets.RHACS_BOT_GITHUB_EMAIL }}>' | ||||||||||||||||||||||||||||||||||||||||
| author: '${{ secrets.RHACS_BOT_GITHUB_USERNAME }} <${{ secrets.RHACS_BOT_GITHUB_EMAIL }}>' | ||||||||||||||||||||||||||||||||||||||||
| branch: chore/update-changelog-fact-${{ inputs.next-version }}-dev | ||||||||||||||||||||||||||||||||||||||||
| signoff: false | ||||||||||||||||||||||||||||||||||||||||
| delete-branch: true | ||||||||||||||||||||||||||||||||||||||||
| title: 'chore(docs): Update CHANGELOG.md and fact version' | ||||||||||||||||||||||||||||||||||||||||
| body: | | ||||||||||||||||||||||||||||||||||||||||
| Cut the CHANGELOG.md changes and update fact to version ${{ inputs.next-version }}-dev | ||||||||||||||||||||||||||||||||||||||||
| team-reviewers: | | ||||||||||||||||||||||||||||||||||||||||
| collector-team | ||||||||||||||||||||||||||||||||||||||||
| draft: false | ||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,60 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Release new version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The release version in <Major>.<minor> format. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dry-run: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: Do not push anything | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION: ${{ inputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| submodules: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ref: release-${{ inputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| token: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Determine patch version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: patch | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| last_tag="$(git describe --tags --abbrev=0)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$last_tag" =~ ^"${VERSION}"\.x$ ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| patch=0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif [[ "$last_tag" =~ ^"${VERSION}"\.([[:digit:]]+)$ ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| patch=$((BASH_REMATCH[1] + 1)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo >&2 "Failed to determine patch version for ${VERSION}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo >&2 "Last tag found: $last_tag" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "patch=$patch" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+29
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Patch selection is based on the nearest tag, not the requested release series.
Safer approach - name: Determine patch version
id: patch
run: |
- last_tag="$(git describe --tags --abbrev=0)"
+ last_tag="$(
+ {
+ git tag --list "${VERSION}.[0-9]*"
+ git tag --list "${VERSION}.x"
+ } | sort -V | tail -n1
+ )"
+
+ if [[ -z "$last_tag" ]]; then
+ echo >&2 "Failed to determine patch version for ${VERSION}"
+ exit 1
+ fi
if [[ "$last_tag" =~ ^"${VERSION}"\.x$ ]]; then
patch=0
elif [[ "$last_tag" =~ ^"${VERSION}"\.([[:digit:]]+)$ ]]; then
patch=$((BASH_REMATCH[1] + 1))📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Initialize mandatory git config | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git config user.name "${{ github.event.sender.login }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git config user.email noreply@github.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create release tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PATCH: ${{ steps.patch.outputs.patch }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git tag -a -m "fact v${VERSION}.${PATCH} release" "${RELEASE}.${PATCH}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Push tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ ! inputs.dry-run }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git push origin "${VERSION}.${PATCH}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+51
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tag name is built from variables that are not available here. Line 55 uses Possible fix - name: Create release tag
- env:
- PATCH: ${{ steps.patch.outputs.patch }}
run: |
- git tag -a -m "fact v${VERSION}.${PATCH} release" "${RELEASE}.${PATCH}"
+ git tag -a \
+ -m "fact v${VERSION}.${{ steps.patch.outputs.patch }} release" \
+ "${VERSION}.${{ steps.patch.outputs.patch }}"
- name: Push tag
if: ${{ ! inputs.dry-run }}
run: |
- git push origin "${VERSION}.${PATCH}"
+ git push origin "${VERSION}.${{ steps.patch.outputs.patch }}"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make branch/tag creation rerunnable.
These commands unconditionally recreate the internal tag and release branch. If a later job fails after the push, rerunning the workflow stops here and requires manual cleanup before you can recover.
🤖 Prompt for AI Agents