v0.7.0b0 - 2024-05-05 #14
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: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Clone full tree, and checkout tag | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python and PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.12" | |
version: "2.15.1" | |
- name: Build source dist and wheels | |
run: pdm build --verbose | |
- name: Upload source dist and wheels to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
retention-days: 5 | |
if-no-files-found: error | |
publish-pypi: | |
needs: build | |
runs-on: ubuntu-22.04 | |
environment: pypi | |
permissions: | |
id-token: write | |
steps: | |
- name: Clone full tree, and checkout tag | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download source dist and wheels from artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
- name: Setup Python and PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.12" | |
version: "2.15.1" | |
- name: Publish source dist and wheels to PyPI | |
run: pdm publish --no-build --verbose | |
publish-github-release: | |
needs: build | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Clone and checkout tag | |
uses: actions/checkout@v4 | |
- name: Download source dist and wheels from artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
- name: Publish source dist and wheels to GitHub Release | |
uses: xresloader/upload-to-github-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
file: dist/* | |
release_id: ${{ github.event.release.id }} | |
overwrite: true |