Skip to content

Commit

Permalink
Merge branch 'main' into feature/file_io
Browse files Browse the repository at this point in the history
  • Loading branch information
victorreijgwart authored Aug 10, 2023
2 parents b4d77a2 + f85359c commit afff72f
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/release_management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
push:
branches: [ main ]

env:
GITHUB_ACTIONS_BOT_NAME: "github-actions[bot]"
GITHUB_ACTIONS_BOT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"

jobs:
prepare-release-command:
name: Process /prepare-release cmds
Expand Down Expand Up @@ -73,8 +77,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bring branch up to date with main
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git config user.name ${GITHUB_ACTIONS_BOT_NAME}
git config user.email ${GITHUB_ACTIONS_BOT_EMAIL}
git merge origin/main
- name: Bump catkin package version numbers
shell: bash
Expand Down Expand Up @@ -121,14 +125,23 @@ jobs:
- name: Checkout the current branch
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- name: Detect version
id: detect-version
shell: bash
run: echo "version=$(sed -nE "s/.*<version>(.*)<\/version>.*/\1/p" libraries/wavemap/package.xml)" >> $GITHUB_OUTPUT
- name: Push tag
env:
TAG: v${{ steps.detect-version.outputs.version }}
shell: bash
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag v${{ steps.detect-version.outputs.version }}
git push origin v${{ steps.detect-version.outputs.version }}
if git show-ref --tags --verify --quiet "refs/tags/${TAG}"; then
echo "Tag ${TAG} already exists. Doing nothing."
else
echo "Creating and pushing tag ${TAG}."
git config user.name ${GITHUB_ACTIONS_BOT_NAME}
git config user.email ${GITHUB_ACTIONS_BOT_EMAIL}
git tag -a -m "Release ${TAG}" ${TAG}
git push origin ${TAG}
fi

0 comments on commit afff72f

Please sign in to comment.