Skip to content

Bump actions/setup-python from 5.1.1 to 5.2.0 #2

Bump actions/setup-python from 5.1.1 to 5.2.0

Bump actions/setup-python from 5.1.1 to 5.2.0 #2

Workflow file for this run

name: Tag with Latest Version on PR Merge
on:
pull_request:
types: [ closed ]
jobs:
tag-on-merge:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: '3.11'
- name: Install Requirements
run: |
pip install --upgrade pip poetry
- name: Set up Git
run: |
git config user.name "dac-bot[bot]"
git config user.email "[email protected]"
- name: Check and update tag
run: |
VERSION="v$(poetry version --short)"
if [[ $(git tag -l $VERSION) ]]; then
echo "Tag $VERSION already exists"
else
echo "Tagging with $VERSION"
git tag "$VERSION"
git push origin --tags
fi