-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
name: 'commit-and-tag' | ||
description: 'Commits and tags the current changes.' | ||
description: Commits and tags the current changes. | ||
inputs: | ||
version: | ||
description: 'Version to use for the tag and commit message' | ||
required: true | ||
description: Version to use for the tag and commit message | ||
user-email: | ||
description: user e-mail address to use for the commit | ||
default: [email protected] | ||
user-name: | ||
description: User name to use for the commit | ||
default: sap-cloud-sdk | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: | | ||
git config --global user.email "$USER_EMAIL" | ||
git config --global user.name "$USER_NAME" | ||
git add -A | ||
git commit -m "v$VERSION" | ||
git tag "v$VERSION" -m "v$VERSION" | ||
git push --follow-tags | ||
shell: bash | ||
# map inputs to environment variables to avoid shell injection | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
USER_EMAIL: ${{ inputs.user-email }} | ||
USER_NAME: ${{ inputs.user-name }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,11 +43,6 @@ jobs: | |
env: | ||
CHANGELOG: ${{ steps.merge-changelogs.outputs.changelog }} | ||
|
||
# TODO: commit-and-tag does not need to rely on changesets, should be a composite action | ||
- name: Setup git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "bot-sdk-js" | ||
- name: Commit and tag | ||
uses: ./.github/actions/commit-and-tag | ||
with: | ||
|