ci/version-as-env (#97)
Release-As: v0.5.3 Reviewed-on: #97 Co-authored-by: servostar <sven.vogel123@web.de> Co-committed-by: servostar <sven.vogel123@web.de>
This commit is contained in:
parent
f1df70aa96
commit
2e02619fdb
|
@ -58,13 +58,16 @@ jobs:
|
||||||
- name: Prepare Release
|
- name: Prepare Release
|
||||||
run: echo ${{ github.sha }} > Release.txt
|
run: echo ${{ github.sha }} > Release.txt
|
||||||
- name: Tag Release Commit
|
- name: Tag Release Commit
|
||||||
|
env:
|
||||||
|
COMMIT_MESSAGE: ${{github.event.head_commit.message}}
|
||||||
run: |
|
run: |
|
||||||
echo ${{github.event.head_commit.message}} | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+' > Version.txt
|
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
||||||
echo "==> Tagging for version: $(cat Version.txt)"
|
echo "==> Tagging for version: ${VERSION}"
|
||||||
git config --global credential.helper store
|
git config --global credential.helper store
|
||||||
echo "https://${USERNAME}:${{secrets.RELEASE_TOKEN}}}@${{github.repositoryUrl}}" > ~/.git-credentials
|
echo "https://${USERNAME}:${{secrets.RELEASE_TOKEN}}}@${{github.repositoryUrl}}" > ~/.git-credentials
|
||||||
git tag -m "Release" "$(cat Version.txt)"
|
git tag -m "Release" "${VERSION}"
|
||||||
git push ${{github.repositoryUrl}} "$(cat Version.txt)"
|
git push origin "${VERSION}"
|
||||||
|
echo "${VERSION}" > Version.txt
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create-release
|
id: create-release
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
|
Loading…
Reference in New Issue