🐛 GitHub Actions: Try to fix setuptools + git tags #8
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 | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check git tag vs package version | |
run: python3 -m pip install --upgrade setuptools && git fetch --tags & git fetch --tags && .github/workflows/release-check-version-tag | |
- name: Build package | |
run: python3 -m pip install --upgrade build && python3 -m build | |
- name: Upload dist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
github-release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download dist | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
- name: Create release on GitHub | |
uses: softprops/action-gh-release@v1 | |
pypi-publish: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/setuptools-ocrd | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Download dist | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |