-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): add comprehensive prepare release workflow for visualiz…
…ation and analysis
- Loading branch information
1 parent
d79519c
commit 5c80e71
Showing
3 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Prepare Release (Visualization/Analysis) | ||
name: Prepare Release - Visualization/Analysis | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -27,6 +27,7 @@ jobs: | |
prefix: ${{ steps.version.outputs.prefix }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -46,18 +47,35 @@ jobs: | |
echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT | ||
echo "prefix=${{ inputs.repository == 'Visualization' && 'vis' || 'ana' }}" >> $GITHUB_OUTPUT | ||
- name: Commit and tag changes | ||
- name: Create release branch and commit changes | ||
run: | | ||
# Create a new branch | ||
git checkout -b release/${{ steps.version.outputs.prefix }}-${{ steps.version.outputs.new_version }} | ||
# Stage and commit changes | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add -A | ||
git commit -m "Releasing ${{ steps.version.outputs.prefix }}-${{ steps.version.outputs.new_version }} [skip ci]" | ||
# Create tag (will be pushed with the merge) | ||
git tag "${{ steps.version.outputs.prefix }}-${{ steps.version.outputs.new_version }}" | ||
git push --follow-tags | ||
# Push branch | ||
git push origin release/${{ steps.version.outputs.prefix }}-${{ steps.version.outputs.new_version }} | ||
- name: Trigger release workflow | ||
run: | | ||
gh workflow run "Release ${{ inputs.repository }}" \ | ||
--ref "${{ steps.version.outputs.prefix }}-${{ steps.version.outputs.new_version }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create release pull request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
title: "Release ${{ inputs.repository }} ${{ steps.version.outputs.new_version }}" | ||
body: | | ||
Automated PR for releasing ${{ inputs.repository }} version ${{ steps.version.outputs.new_version }} | ||
This PR was automatically created by the release workflow. | ||
After merging, the tag `${{ steps.version.outputs.prefix }}-${{ steps.version.outputs.new_version }}` will trigger the release workflow. | ||
branch: release/${{ steps.version.outputs.prefix }}-${{ steps.version.outputs.new_version }} | ||
base: main | ||
labels: release | ||
delete-branch: true | ||
|
||
# The appropriate release workflow will be triggered after the PR is merged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters