-
-
Notifications
You must be signed in to change notification settings - Fork 21
57 lines (48 loc) · 1.34 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Publish
on:
push:
tags:
- "v*.*.*"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Build package
run: poetry build -vvv
- uses: actions/upload-artifact@v4
with:
name: package
path: |
README.md
pyproject.toml
dist/*
if-no-files-found: error
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
pypi:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: package
- run: ls dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 # cspell: disable-line
homebrew:
uses: janw/workflows/.github/workflows/poetry-homebrew-formula.yaml@main
needs: pypi
with:
formula-name: podcast-archiver
secrets:
personal-access-token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}