Skip to content

Commit

Permalink
release.yml workflow (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianswms authored Oct 22, 2024
1 parent 42205af commit 0b41e54
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and publish

on:
push:

jobs:
build:
name: Build wheel and sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- uses: hynek/build-and-inspect-python-package@v2

publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
environment:
name: publishing
url: https://pypi.org/p/target-apprise
needs: build
permissions:
contents: write
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- uses: svenstaro/upload-release-action@v2
with:
file: dist/*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- uses: pypa/gh-action-pypi-publish@v1.10.3
with:
attestations: true

0 comments on commit 0b41e54

Please sign in to comment.