Skip to content

ci(deps): update pypa/gh-action-pypi-publish action to v1.12.4 (#189) #382

ci(deps): update pypa/gh-action-pypi-publish action to v1.12.4 (#189)

ci(deps): update pypa/gh-action-pypi-publish action to v1.12.4 (#189) #382

Workflow file for this run

name: Main
on:
push:
branches: [main]
tags:
- "v*"
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint:
name: Lint code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup vapoursynth
uses: deadnews/action-setup-vs@main
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
cache: poetry
- name: Install deps
run: poetry install
- name: Lint code
run: poetry run poe lint
publish-pypi:
name: Release to PyPI
if: github.ref_type == 'tag'
needs: [lint]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: |
pipx install poetry
pipx inject poetry poetry-dynamic-versioning[plugin]
- uses: actions/setup-python@v5
- name: Build package
run: poetry build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
github-deploy:
name: Release to GitHub
if: github.ref_type == 'tag'
needs: [lint]
environment: github-releases
permissions:
contents: write
env:
CHANGELOG: https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md
PRERELEASE: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create GitHub Release
run: |
gh release create ${{ github.ref_name }} \
--title ${{ github.ref_name }} \
--notes="See [the CHANGELOG](${{ env.CHANGELOG }}) for more details." \
--draft=${{ env.PRERELEASE }} \
--prerelease=${{ env.PRERELEASE }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}