kikocis/dataspace-portal public
Changesets · Branches · Tags · Compare
| Changeset | 377234660bb5eeecceeb02b61cdad99df5753429d706493c55a93cc08764e2f1 |
|---|---|
| Author | Tim Berthold <75306992+tmberthold@users.noreply.github.com> · 2025-01-13 09:43 +01:00 |
| Committer | GitHub <noreply@github.com> · 2025-01-13 09:43 +01:00 |
| Parents | a561cc5cdba6 |
1 file changed
added .github/workflows/release-branch.yml +32 −0
| @@ -0,0 +1,32 @@ | ||
| 1 | +name: Create Release Branch | |
| 2 | + | |
| 3 | +on: | |
| 4 | + release: | |
| 5 | + types: | |
| 6 | + - created | |
| 7 | + | |
| 8 | +jobs: | |
| 9 | + create-release-branch: | |
| 10 | + runs-on: ubuntu-latest | |
| 11 | + | |
| 12 | + steps: | |
| 13 | + - name: Check out the repository | |
| 14 | + uses: actions/checkout@v3 | |
| 15 | + | |
| 16 | + - name: Set up Git | |
| 17 | + run: | | |
| 18 | + git config user.name "${{ github.actor }}" | |
| 19 | + git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| 20 | + | |
| 21 | + - name: Create a new branch from the release | |
| 22 | + run: | | |
| 23 | + # Normalize the release tag to ensure it is a valid branch name | |
| 24 | + SAFE_TAG_NAME=$(echo "${{ github.event.release.tag_name }}" | sed 's/[^a-zA-Z0-9._-]/-/g') | |
| 25 | + BRANCH_NAME="release/$SAFE_TAG_NAME" | |
| 26 | + echo "Creating branch $BRANCH_NAME" | |
| 27 | + git branch $BRANCH_NAME | |
| 28 | + git push origin $BRANCH_NAME | |
| 29 | + | |
| 30 | + - name: Confirm branch creation | |
| 31 | + run: | | |
| 32 | + echo "Branch release/${{ github.event.release.tag_name }} created successfully." |