Skip to content
Merged
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
22 changes: 16 additions & 6 deletions .github/workflows/prep-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
# ADD THIS SECTION
outputs:
sha: ${{ steps.get_sha.outputs.sha }}

Expand All @@ -44,7 +43,6 @@ jobs:
with:
ref: main

# ADD THIS STEP
- name: Get Commit SHA
id: get_sha
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
Expand All @@ -53,11 +51,23 @@ jobs:
env:
RELEASE_TAG: ${{ inputs.release || env.RELEASE }}
run: |
# ... (Same deletion logic as before) ...

# ... (Same creation logic) ...
echo "Processing release for: $RELEASE_TAG"

# 1. CLEANUP: Check if the release/tag exists and nukes it.
# This ensures the 'dev' tag is free to move to the new commit.
if gh release view "$RELEASE_TAG" > /dev/null 2>&1; then
echo "Existing release found. Deleting '$RELEASE_TAG' to update pointer..."
gh release delete "$RELEASE_TAG" --cleanup-tag -y
else
echo "No existing release for '$RELEASE_TAG'. Creating new one."
fi

# 2. CREATE: Create the release pointing to the latest commit (target main).
echo "Creating release..."
gh release create "$RELEASE_TAG" \
--prerelease \
--target "${{ steps.get_sha.outputs.sha }}" \
--title "$RELEASE_TAG build" \
--generate-notes
--generate-notes

echo "Success: $RELEASE_TAG updated to latest commit."
Loading