Skip to content

Publish 1.0 to PyPI #31

Publish 1.0 to PyPI

Publish 1.0 to PyPI #31

Workflow file for this run

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/$current_version" >/dev/null 2>&1; then
echo "::warning title=Tag already exists::${current_version}"
tag_exist=true
fi
echo "version=${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.version }}
git push origin ${{ steps.package_info.outputs.version }}