-
Notifications
You must be signed in to change notification settings - Fork 65
80 lines (77 loc) · 2.37 KB
/
release.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Publish Release
on:
release:
types:
- published
env:
AWS_DEFAULT_REGION: us-east-1
jobs:
build-pypi:
name: Build PyPi 📦
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub (complete)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🏗 Setup Python
uses: finleyfamily/action-setup-python@v1.0.0
with:
poetry-plugins: poetry-dynamic-versioning[plugin]
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos (ubuntu)
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: ⤵️ Install Dependencies (ubuntu)
run: sudo apt-get update && sudo apt-get install sed -y
- name: 👷 Build
run: make build
- name: ⤴️ Upload distribution artifact
uses: actions/upload-artifact@v4
with:
name: pypi-dist
path: dist
publish-pypi:
name: Publish 📦 To PyPI
needs:
- build-pypi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/runway
permissions:
id-token: write
steps:
- name: ⤵️ Check out code from GitHub (complete)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⤵️ Download distribution artifact
uses: actions/download-artifact@v4
with:
name: pypi-dist
path: dist
- name: 🏗 Setup Python
uses: finleyfamily/action-setup-python@v1.0.0
with:
poetry-install: false
poetry-plugins: poetry-dynamic-versioning[plugin]
- name: 🚀 Publish Distribution 📦 to PyPI
run: pypa/gh-action-pypi-publish@v1.10.1
notify-on-publish:
name: Notify
needs:
- publish-pypi
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
- name: 🚀 Microsoft Teams Notification
uses: skitionek/notify-microsoft-teams@v1.0.8 # cspell:ignore skitionek
if: always()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
needs: ${{ toJson(needs) }}
job: ${{ toJson(job) }}
steps: ${{ toJson(steps) }}