Update version to 1.1 for github oidc publish #34
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: Auto Tagging | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "aws_fusion/**" | |
- "setup.py" | |
concurrency: tagging | |
jobs: | |
tag: | |
runs-on: ubuntu-latest | |
name: Auto Tagging | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Get package information | |
id: package_info | |
run: | | |
current_version=$(./setup.py --version) | |
tag_exist=false | |
if git rev-parse "refs/tags/v$current_version" >/dev/null 2>&1; then | |
echo "::warning title=Tag already exists::v${current_version}" | |
tag_exist=true | |
fi | |
echo "tag=v${current_version}" >> "$GITHUB_OUTPUT" | |
echo "tag_exist=${tag_exist}" >> "$GITHUB_OUTPUT" | |
- name: Add git tag | |
if: ${{ steps.package_info.outputs.tag_exist == 'false' }} | |
run: | | |
git tag ${{ steps.package_info.outputs.tag }} | |
git push origin ${{ steps.package_info.outputs.tag }} |