forked from abelcheung/types-lxml
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (72 loc) · 1.66 KB
/
Copy pathrelease.yml
File metadata and controls
83 lines (72 loc) · 1.66 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
78
79
80
81
82
name: Publish releases
on:
push:
tags:
- '20*'
jobs:
build:
uses: ./.github/workflows/build_inc.yml
with:
gitref: ${{ github.ref }}
all_tests:
needs: build
permissions:
actions: write
strategy:
matrix:
flavor:
- "normal"
- "alt"
uses: ./.github/workflows/test_inc.yml
with:
flavor: ${{ matrix.flavor }}
pypi-rel:
needs: all_tests
runs-on: ubuntu-24.04
environment: pypi
permissions:
id-token: write
strategy:
matrix:
flavor:
- "normal"
- "alt"
steps:
- uses: actions/download-artifact@v4
with:
name: dist-${{ matrix.flavor }}
path: dist
- name: Determine PyPI URL
uses: haya14busa/action-cond@v1
id: pypi-url
with:
cond: ${{ vars.OFFICIAL_PYPI || false }}
if_true: "https://upload.pypi.org/legacy/"
if_false: "https://test.pypi.org/legacy/"
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: ${{ steps.pypi-url.outputs.value }}
gh-rel:
needs: all_tests
runs-on: ubuntu-24.04
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true
- uses: actions/attest-build-provenance@v2
with:
subject-path: |
dist/*.whl
dist/*.tar.gz
# only need contents: write
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*.whl,dist/*.tar.gz"
artifactErrorsFailBuild: true
draft: true