forked from misiektoja/spotify_monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.06 KB
/
Copy pathpublish.yml
File metadata and controls
39 lines (34 loc) · 1.06 KB
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
name: Publish to PyPI
on:
release:
types: [published]
permissions: {}
jobs:
test:
name: Tests
# A called workflow cannot exceed what the calling job grants, so the checkout in tests.yml needs this.
permissions:
contents: read
uses: ./.github/workflows/tests.yml
build-n-publish:
name: Build and publish Python distribution to PyPI
needs: test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/spotify-monitor/
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.x"
- name: Install build
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2