Skip to content

chore: update release workflow to use latest actions and improve buil… #8

chore: update release workflow to use latest actions and improve buil…

chore: update release workflow to use latest actions and improve buil… #8

name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v5
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
build:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build
run: |
pip install -U pip build
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
pypi:
needs: [release-please, build]
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyflowlauncher
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1