Repo Version Tagging #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Repo Version Tagging | |
# This workflow will read the version details from the repo and apply a branch | |
on: | |
workflow_dispatch: | |
inputs: | |
run_for_real: | |
required: true | |
default: false | |
type: boolean | |
description: "Apply next tag (or Dry Run)" | |
concurrency: production | |
jobs: | |
version-tagging: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
token: ${{ secrets.SC_GH_TAG_TOKEN }} | |
- name: Determine Tag | |
id: taggerVersion | |
run: | | |
app_version=$(tools/get_next_version.sh) | |
echo "New Proposed tag: $app_version" | |
echo "package_app_version=$app_version" >> $GITHUB_ENV | |
- name: Apply Tag | |
if: ${{ inputs.run_for_real }} | |
id: taggerApply | |
run: | | |
echo "Applying tag ${{env.package_app_version}} ..." | |
git tag "${{env.package_app_version}}" | |
echo "Pushing changes..." | |
git push --tags |