Publish 1.0 to PyPI #28
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_does_not_exist=true | |
if git rev-parse "refs/tags/$current_version" >/dev/null 2>&1; then | |
tag_does_not_exist=false | |
else | |
echo "::warning title=Tag already exists::${current_version}" | |
fi | |
echo "version=${current_version}" >> "$GITHUB_OUTPUT" | |
echo "tag_does_not_exists=${tag_does_not_exist}" >> "$GITHUB_OUTPUT" | |
- name: Add git tag | |
if: ${{ steps.package_info.outputs.tag_does_not_exists == 'true' }} | |
run: | | |
git tag ${{ steps.package_info.outputs.version }} | |
git push origin ${{ steps.package_info.outputs.version }} |