diff --git a/bump-version/action.yml b/bump-version/action.yml index 0ab6c83..9fc8049 100644 --- a/bump-version/action.yml +++ b/bump-version/action.yml @@ -6,7 +6,7 @@ inputs: required: true version_bump_script: description: The version bump script - required: true + default: '' commit_template: description: The template for the git commit message default: "BUMP ${VERSION}" @@ -21,26 +21,27 @@ runs: using: composite steps: - name: Set new version + if: ${{ inputs.version_bump_script != '' }} shell: bash -eux {0} run: | ${{ inputs.version_bump_script }} ${{ inputs.version }} - name: Get the commit message shell: bash -eux {0} run: | - export VERSION=${{inputs.version}} - export COMMIT_MESSAGE=$(echo "${{inputs.commit_template}}" | envsubst) + export VERSION=${{ inputs.version }} + export COMMIT_MESSAGE=$(echo "${{ inputs.commit_template }}" | envsubst) echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV - name: Commit the version bump uses: mongodb-labs/drivers-github-tools/git-sign@v2 with: - command: git commit -a -m \"${{env.COMMIT_MESSAGE}}\" -s --gpg-sign=${{ env.GPG_KEY_ID }} - artifactory_image: ${{inputs.artifactory_image}} + command: git commit -a -m \"${{ env.COMMIT_MESSAGE }}\" -s --gpg-sign=${{ env.GPG_KEY_ID }} + artifactory_image: ${{ inputs.artifactory_image }} - name: Push the commit to the source branch shell: bash -eux {0} run: | if [ ${{ inputs.push_commit }} == "true" ]; then git push origin - echo "### Pushed version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY + echo "Pushed version bump: ${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY else - echo "### Created version bump (no push): ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY - fi \ No newline at end of file + echo "Created version bump (no push): ${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY + fi diff --git a/tag-version/action.yml b/tag-version/action.yml index 91e10c0..55cfca3 100644 --- a/tag-version/action.yml +++ b/tag-version/action.yml @@ -9,7 +9,7 @@ inputs: default: "${VERSION}" tag_message_template: description: The template for the git tag message - default: "BUMP ${VERSION}" + default: "Release ${VERSION}" push_tag: description: Whether to push the tag default: "true" @@ -23,14 +23,14 @@ runs: - name: Get the tag shell: bash -eux {0} run: | - export VERSION=${{inputs.version}} - export TAG=$(echo "${{inputs.tag_template}}" | envsubst) + export VERSION=${{ inputs.version }} + export TAG=$(echo "${{ inputs.tag_template }}" | envsubst) echo "TAG=$TAG" >> $GITHUB_ENV - name: Get the tag message shell: bash -eux {0} run: | - export VERSION=${{inputs.version}} - export TAG_MESSAGE=$(echo "${{inputs.tag_message_template}}" | envsubst) + export VERSION=${{ inputs.version }} + export TAG_MESSAGE=$(echo "${{ inputs.tag_message_template }}" | envsubst) echo "TAG_MESSAGE=$TAG_MESSAGE" >> $GITHUB_ENV - name: Tag the version uses: mongodb-labs/drivers-github-tools/git-sign@v2 @@ -52,7 +52,7 @@ runs: run: | if [ ${{ inputs.push_tag }} == "true" ]; then git push origin --tags - echo "### Pushed tag: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY + echo "Pushed tag: ${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY else - echo "### Created tag (no push): ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY - fi \ No newline at end of file + echo "Created tag (no push): ${{ inputs.version }}" >> $GITHUB_STEP_SUMMARY + fi