ci: add user identity to release (#98)
Release-As: v0.5.3 Reviewed-on: #98 Co-authored-by: servostar <sven.vogel123@web.de> Co-committed-by: servostar <sven.vogel123@web.de>
This commit is contained in:
parent
2e02619fdb
commit
3512cc66cc
|
@ -40,6 +40,7 @@ jobs:
|
||||||
if: contains(github.event.head_commit.message, 'Release-As:')
|
if: contains(github.event.head_commit.message, 'Release-As:')
|
||||||
env:
|
env:
|
||||||
USERNAME: servostar
|
USERNAME: servostar
|
||||||
|
EMAIL: sven.vogel123@web.de
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -63,10 +64,18 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
||||||
echo "==> Tagging for version: ${VERSION}"
|
echo "==> Tagging for version: ${VERSION}"
|
||||||
|
echo "::group::{Configure git credential store}"
|
||||||
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
|
||||||
|
echo "::endgroup::"
|
||||||
|
echo "::group::{Configure git user identity}"
|
||||||
|
git config --global user.name "${USERNAME}"
|
||||||
|
git config --global user.email "${EMAIL}"
|
||||||
|
echo "::endgroup::"
|
||||||
|
echo "::group::{Tag commit}"
|
||||||
git tag -m "Release" "${VERSION}"
|
git tag -m "Release" "${VERSION}"
|
||||||
git push origin "${VERSION}"
|
git push origin "${VERSION}"
|
||||||
|
echo "::endgroup::"
|
||||||
echo "${VERSION}" > Version.txt
|
echo "${VERSION}" > Version.txt
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create-release
|
id: create-release
|
||||||
|
|
Loading…
Reference in New Issue