Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
36520e2
Change pull_request to pull_request_target
ayeshurun Sep 17, 2025
444d351
Merge pull request #4 from ayeshurun/fix-semantic-pr
ayeshurun Sep 17, 2025
8b34e28
Merge branch 'microsoft:main' into main
ayeshurun Sep 18, 2025
0c47fda
Merge branch 'microsoft:main' into main
ayeshurun Sep 18, 2025
ccd7b91
Merge branch 'microsoft:main' into main
ayeshurun Sep 21, 2025
43cc353
Merge branch 'microsoft:main' into main
ayeshurun Sep 21, 2025
ea76426
Merge branch 'microsoft:main' into main
ayeshurun Sep 28, 2025
c702b91
Merge branch 'microsoft:main' into main
ayeshurun Sep 29, 2025
5e847ef
Merge branch 'microsoft:main' into main
ayeshurun Oct 16, 2025
69c733e
Merge branch 'microsoft:main' into main
ayeshurun Oct 20, 2025
5d5f1ad
Merge branch 'microsoft:main' into main
ayeshurun Oct 20, 2025
0c5de9c
Merge branch 'microsoft:main' into main
ayeshurun Oct 21, 2025
025f456
Merge branch 'microsoft:main' into main
ayeshurun Oct 22, 2025
df0c5a4
Merge branch 'microsoft:main' into main
ayeshurun Oct 23, 2025
c6892ed
Merge branch 'microsoft:main' into main
ayeshurun Oct 26, 2025
f30ce9b
Merge branch 'microsoft:main' into main
ayeshurun Nov 4, 2025
cf7e06b
Merge branch 'microsoft:main' into main
ayeshurun Nov 11, 2025
3a727dd
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Nov 13, 2025
d3cfbb4
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Nov 17, 2025
bb051b1
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Nov 26, 2025
f46f685
Merge branch 'microsoft:main' into main
ayeshurun Dec 9, 2025
19e3a75
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Dec 14, 2025
55020f0
Fix new functionality section in release notes
Dec 14, 2025
0c08fb5
Merge branch 'microsoft:main' into main
ayeshurun Dec 15, 2025
beb0149
Fix new functionality section in release notes
Dec 14, 2025
c0e3672
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Dec 17, 2025
ca313c3
Introduce release workflow
Dec 17, 2025
51c67c9
Update create-release.yml
ayeshurun Dec 22, 2025
f5a0939
Revert release notes change
ayeshurun Dec 22, 2025
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
169 changes: 169 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
name: πŸš€ Create GitHub Release

on:
workflow_dispatch:
inputs:
version:
description: 'The version to release (e.g., v1.2.0)'
required: true
commit_sha:
description: 'Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)'
required: false
default: ''

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to access full commit history for validation

- name: Display workflow information
run: |
if [ -n "${{ github.event.inputs.commit_sha }}" ]; then
TARGET_INFO="- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`"
else
TARGET_INFO="- **Target Commit:** Latest commit on current branch (HEAD)"
fi

cat >> $GITHUB_STEP_SUMMARY << EOF
# πŸš€ Create Release Workflow

## ℹ️ Workflow Information
- **Version:** ${{ github.event.inputs.version }}
$TARGET_INFO

EOF

- name: Validate commit SHA (if provided)
if: ${{ github.event.inputs.commit_sha != '' }}
run: |
COMMIT_SHA="${{ github.event.inputs.commit_sha }}"
if ! git rev-parse --verify "$COMMIT_SHA^{commit}" >/dev/null 2>&1; then
cat >> $GITHUB_STEP_SUMMARY << EOF
## ❌ Error: Invalid Commit SHA

The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository.

### πŸ“ Troubleshooting
- Verify the commit SHA exists in the repository
- Ensure you are using the full commit SHA (or at least 7 characters)
- Check that the commit is in the current branch history

EOF
echo "Error: Invalid commit SHA: $COMMIT_SHA"
exit 1
fi
echo "βœ… Commit SHA validated successfully: $COMMIT_SHA"

- name: Set up release variables
id: set_vars
run: |
VERSION="${{ github.event.inputs.version }}"
COMMIT_SHA="${{ github.event.inputs.commit_sha }}"

# Use provided commit SHA or default to HEAD
if [ -n "$COMMIT_SHA" ]; then
TARGET_COMMIT="$COMMIT_SHA"
else
TARGET_COMMIT="HEAD"
fi

echo "tag_name=$VERSION" >> $GITHUB_OUTPUT
echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT
echo "target_commit=$TARGET_COMMIT" >> $GITHUB_OUTPUT

# Get the actual commit SHA for display
ACTUAL_SHA=$(git rev-parse "$TARGET_COMMIT")
echo "actual_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT

echo "βœ… Release variables set:"
echo " - Tag name: $VERSION"
echo " - Target commit: $ACTUAL_SHA"
echo " - Changelog file: .changes/${VERSION}.md"

- name: Validate release notes file
run: |
CHANGELOG_FILE="${{ steps.set_vars.outputs.changelog_file_path }}"
if [ ! -f "$CHANGELOG_FILE" ]; then
cat >> $GITHUB_STEP_SUMMARY << EOF
## ❌ Error: Release Notes File Not Found

The release notes file was not found at the expected location:

\`\`\`
$CHANGELOG_FILE
\`\`\`

### πŸ“ What to do:
1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\`
2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\`
3. You can use \`changie batch <version>\` to generate the changelog file

### πŸ“‚ Available changelog files:
\`\`\`
$(ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found")
\`\`\`

EOF
echo "Error: Release notes file not found at $CHANGELOG_FILE"
exit 1
fi
echo "βœ… Release notes file found at: $CHANGELOG_FILE"

- name: Create Release with GitHub CLI
env:
GH_TOKEN: ${{ github.token }}
run: |
cat >> $GITHUB_STEP_SUMMARY << EOF
## πŸ—οΈ Creating Release

Creating release with the following details:
- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`
- **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`
- **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\`

EOF

# Create the release with the target commit
if gh release create ${{ steps.set_vars.outputs.tag_name }} \
--title "${{ steps.set_vars.outputs.tag_name }}" \
--notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \
--target "${{ steps.set_vars.outputs.target_commit }}"; then

cat >> $GITHUB_STEP_SUMMARY << EOF
## βœ… Release Created Successfully!

πŸŽ‰ **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!**

### πŸ“‹ Release Details:
- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`
- **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`
- **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }})

EOF
else
cat >> $GITHUB_STEP_SUMMARY << EOF
## ❌ Error: Failed to Create Release

The GitHub CLI failed to create the release. This could be due to:

### πŸ” Common Issues:
- A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists
- Insufficient permissions to create releases
- Network connectivity issues
- Invalid release notes format

### πŸ“ Next Steps:
1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\`
2. Verify you have the necessary permissions to create releases
3. Review the workflow run logs for detailed error messages

EOF
echo "Error: Failed to create release"
exit 1
fi
2 changes: 1 addition & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@ hide:

* Initial public release
* Released to PyPI
* Onboarded to GitHub Pages
* Onboarded to GitHub Pages