-
Notifications
You must be signed in to change notification settings - Fork 13
54 lines (44 loc) · 1.81 KB
/
Copy pathrelease-please.yml
File metadata and controls
54 lines (44 loc) · 1.81 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
on:
push:
branches: ["main"]
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
# This job has the highest privileges, so always pin actions to a specific commit hash.
# Ensure the referenced commit hash is verified and free from known vulnerabilities.
id-token: write # for PYPI release
contents: write
pull-requests: write
steps:
- name: Release
id: release
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: ${{ steps.release.outputs.release_created }}
- name: tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
# setup github actions bot as author
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
# create and push major version tag
git tag v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }} -f
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
if: ${{ steps.release.outputs.release_created }}
with:
python-version: "3.10"
- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
if: ${{ steps.release.outputs.release_created }}
run: python -m build
- name: Publish package
if: ${{ steps.release.outputs.release_created }}
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0