Release v0.3.0
#10
Workflow file for this run
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: Publish on PyPI | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+* | |
jobs: | |
validate-release-tag: | |
if: github.repository == 'aiidateam/pgsu' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Validate the tag version against the package version | |
run: python .github/workflows/validate_release_tag.py $GITHUB_REF | |
publish: | |
name: Publish to PyPI | |
needs: [validate-release-tag] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install flit | |
run: pip install flit~=3.4 | |
- name: Build and publish | |
run: flit publish | |
env: | |
FLIT_USERNAME: __token__ | |
FLIT_PASSWORD: ${{ secrets.pypi_token }} |