set author and bump version #3
Workflow file for this run
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: Create Tag from .version File | |
permissions: read-all | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- ".version" # Trigger only when the .version file changes | |
jobs: | |
create_tag: | |
runs-on: ubuntu-24.04 | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/[email protected] | |
# Read the content of the .version file | |
- name: Read version from .version file | |
id: read_version | |
run: | | |
if [ ! -f .version ]; then | |
echo "The .version file does not exist." | |
exit 1 | |
fi | |
version=$(cat .version | tr -d '[:space:]') | |
echo "version=$version" >> $GITHUB_ENV | |
# Create a tag with the version | |
- name: Create and push tag | |
env: | |
GITHUB_TOKEN: ${{ secrets.CISCO_SERVICE_GITHUB_AUTOMATION_TOKEN }} | |
run: | | |
git config user.name cisco-service | |
git config user.email [email protected] | |
git tag $version | |
git push origin $version |