Skip to content

Commit

Permalink
ci: add user identity to release (#98)
Browse files Browse the repository at this point in the history
Release-As: v0.5.3
Reviewed-on: https://git.montehaselino.de/DHBW/dhbw-abb-typst-template/pulls/98
Co-authored-by: servostar <sven.vogel123@web.de>
Co-committed-by: servostar <sven.vogel123@web.de>
  • Loading branch information
Servostar committed Nov 25, 2024
1 parent 2e02619 commit 3512cc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitea/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
if: contains(github.event.head_commit.message, 'Release-As:')
env:
USERNAME: servostar
EMAIL: sven.vogel123@web.de
steps:
- name: Check out repository code
uses: actions/checkout@v3
Expand All @@ -63,10 +64,18 @@ jobs:
run: |
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
echo "==> Tagging for version: ${VERSION}"
echo "::group::{Configure git credential store}"
git config --global credential.helper store
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 push origin "${VERSION}"
echo "::endgroup::"
echo "${VERSION}" > Version.txt
- name: Create release
id: create-release
Expand Down

0 comments on commit 3512cc6

Please sign in to comment.