Skip to content

chore: Updating changelog for 1.0.28 #50

chore: Updating changelog for 1.0.28

chore: Updating changelog for 1.0.28 #50

Workflow file for this run

# Compares the version in pyproject.toml to tags on the repo. If the tag doesn't exist, a new tag is created, which
# then triggers the normal "on tag" release automation in the build job
name: Auto Tag
on:
push:
branches:
- main
concurrency:
group: main-release-check
jobs:
check-version:
name: Check version increment
runs-on: ubuntu-latest
steps:
- name: Clean workspace
uses: Chia-Network/actions/clean-workspace@main
- name: Checkout current branch
uses: actions/checkout@v3
with:
# Need PACKAGE_ADMIN_PAT token so when the tag is created, the tag automation runs
token: ${{ secrets.PACKAGE_ADMIN_PAT }}
fetch-depth: 0
- name: Install yq
run: pip install yq
# Install Python for commitizen, the automatic changelog tool
- name: Setup Python
uses: Chia-Network/actions/setup-python@main
with:
python-version: '3'
- name: Install commitizen
run: |
pip install -U commitizen
- name: Configure commit signing for ChiaAutomation
uses: Chia-Network/actions/commit-sign/gpg@main
with:
gpg_private_key: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_KEY }}
passphrase: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_PASSPHRASE }}
- name: Check for current version tag. Create if it doesn't exist. Create CHANGELOG
run: |
version=$(cat $GITHUB_WORKSPACE/pyproject.toml | tomlq -r '.tool.poetry.version')
echo "Version is: $version"
if [ $(git tag -l "$version") ]; then
echo "Tag exists, nothing to do"
else
echo "Tag does not exist. Creating and pushing tag $version"
cz changelog --unreleased-version=$version
git add CHANGELOG.md
git commit -m "chore: Updating changelog for $version"
git tag $version -m "Version $version"
git push origin $version
git push origin main
fi