Skip to content

bump: version 0.6.0 → 0.7.0 #21

bump: version 0.6.0 → 0.7.0

bump: version 0.6.0 → 0.7.0 #21

Workflow file for this run

name: Build and publish
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
- run: pdm build
- uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
pypi-release:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/amisc
permissions:
id-token: write # trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: Github release
needs:
- build
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pdm-project/setup-pdm@v4
with:
python-version: 3.11
cache: true
- run: pdm sync -G dev --no-default
- name: Create release notes
run: pdm run cz changelog $(pdm run cz version --project) --dry-run > body.md
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: ncipollo/release-action@v1
with:
bodyFile: body.md
name: ${{ github.ref_name }}
artifacts: ${{ github.workspace }}/dist/*