-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (67 loc) · 1.91 KB
/
release-please.yaml
File metadata and controls
77 lines (67 loc) · 1.91 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
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
name: Run Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
release-type: python
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
python-release:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
environment:
name: pypi
url: https://pypi.org/p/spotify-confidence-sdk
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Check out src from Git
uses: actions/checkout@v4
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
fetch-depth: 0 # this (and below) is needed to have setuptools_scm report the correct version
fetch-tags: true
- name: Upgrade pip
run: pip install --upgrade pip
- name: Create and activate Virtualenv
run: |
pip install virtualenv
[ ! -d ".venv" ] && virtualenv .venv
. .venv/bin/activate
- name: Install dependencies
run: |
pip install .
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Make sure dist folder is empty
run: >-
rm -rf dist/*
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.13.0