-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 933 Bytes
/
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
name: Publish the package to pypi
on: workflow_dispatch
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/lazy-github
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: yezz123/setup-uv@v4
# Build the distribution
- name: Build lazy-github distribution
run: uvx hatch build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
notify:
name: Notify when this workflow completes (regardless of success or failure)
if: ${{ always() }}
needs:
- pypi-publish
runs-on: ubuntu-latest
steps:
- uses: nobrayner/discord-webhook@v1
with:
github-token: ${{ secrets.github_token }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}