-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (55 loc) · 1.96 KB
/
_package-publish.yml
File metadata and controls
69 lines (55 loc) · 1.96 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
name: "Publish Package"
on:
workflow_call:
# No inputs needed at this time
jobs:
package_publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: "0.6.3"
cache-dependency-glob: uv.lock
enable-cache: true
- name: Install dev tools
shell: bash
run: .github/workflows/_install_dev_tools.bash
- name: Docs
run: make docs
- name: Generate release notes
uses: orhun/git-cliff-action@4a4a951bc43fafe41cd2348d181853f52356bee7 # v4.4.2
id: git-cliff
with:
config: pyproject.toml
args: --verbose --latest --strip header
env:
OUTPUT: RELEASE_NOTES.md
GITHUB_REPO: ${{ github.repository }}
- name: Print the release notes
run: cat "${{ steps.git-cliff.outputs.changelog }}"
- name: Build distribution into dist/
run: make dist
- name: Publish distribution to Python Package Index at pypi.org
run: uv publish -t ${{ secrets.UV_PUBLISH_TOKEN }}
- name: Have audit checks publish to reports/ for auditing
run: make audit
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} ./dist/* ./reports/* \
--notes-file ${{ steps.git-cliff.outputs.changelog }}
- name: Allow other workflows to trigger on release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/helmut-hoffer-von-ankershoffen/oe-python-template-example/dispatches \
-f event_type=release_created_programatically