Release v1.1.0
#5
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: release | |
# Automate deployment to PyPI when creating a release tag vX.Y.Z | |
# will only be published to PyPI if the git tag matches the release version | |
# and the pre-commit and tests pass | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
check-release-tag: | |
if: github.repository == 'aiidateam/disk-objectstore' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Install Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Validate the tag version against the package version | |
run: python .github/workflows/check_release_tag.py $GITHUB_REF disk_objectstore/__init__.py | |
pre-commit: | |
needs: [check-release-tag] | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
cache: 'pip' | |
cache-dependency-path: pyproject.toml | |
- uses: pre-commit/[email protected] | |
publish: | |
name: Publish to PyPI | |
needs: [check-release-tag, pre-commit] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Install Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install flit | |
run: pip install flit~=3.4 | |
- name: Build and publish | |
run: flit publish | |
env: | |
FLIT_USERNAME: __token__ | |
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }} |