ci: store release version in environment variable

This commit is contained in:
Sven Vogel 2024-11-25 13:11:22 +01:00
parent f1df70aa96
commit 196be63418
1 changed files with 5 additions and 4 deletions

View File

@ -59,12 +59,13 @@ jobs:
run: echo ${{ github.sha }} > Release.txt
- name: Tag Release Commit
run: |
echo ${{github.event.head_commit.message}} | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+' > Version.txt
echo "==> Tagging for version: $(cat Version.txt)"
export VERSION=$(echo ${{github.event.head_commit.message}} | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
echo "==> Tagging for version: ${VERSION}"
git config --global credential.helper store
echo "https://${USERNAME}:${{secrets.RELEASE_TOKEN}}}@${{github.repositoryUrl}}" > ~/.git-credentials
git tag -m "Release" "$(cat Version.txt)"
git push ${{github.repositoryUrl}} "$(cat Version.txt)"
git tag -m "Release" "${VERSION}"
git push origin "${VERSION}"
echo "${VERSION}" > Version.txt
- name: Create release
id: create-release
uses: https://gitea.com/actions/release-action@main