Skip to content

Release v0.2.1

Release v0.2.1 #15

Workflow file for this run

name: Publish release
on:
release:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel twine build
- name: Make sure version in atom_tools.__init__.py has been updated
run: |
version=$(python3 -c 'from atom_tools.__init__ import __version__; print(f"refs/tags/v{__version__}")')
if $version != "${{ github.ref }}"; then
echo "Version in atom_tools.__init__.py has not been updated. $version != ${{ github.ref }}"
exit 1
fi
- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
python3 -m build
- name: Publish package distributions to PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1