forked from open-meteo/python-omfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (59 loc) · 2.08 KB
/
Copy pathrelease-please.yml
File metadata and controls
67 lines (59 loc) · 2.08 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
name: Release Please
on:
workflow_run:
workflows: ["Build and Test"]
types:
- completed
jobs:
release-please:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
runs-on: ubuntu-latest
permissions:
issues: write # to create labels (googleapis/release-please-action)
pull-requests: write # to create release PR (googleapis/release-please-action)
id-token: write
contents: write
attestations: write
actions: read
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v6
if: ${{ steps.release.outputs.release_created }}
- name: Download artifacts from CI
uses: dawidd6/action-download-artifact@v9
if: ${{ steps.release.outputs.release_created }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build-test.yml
commit: ${{ github.event.workflow_run.head_sha }}
workflow_conclusion: success
path: artifact-download
# Create dist directory
- name: Create dist directory
if: ${{ steps.release.outputs.release_created }}
run: mkdir -p dist
shell: bash
# Move all wheels to dist directory
- name: Collect wheels
if: ${{ steps.release.outputs.release_created }}
run: |
find artifact-download -name "*.whl" -o -name "*.tar.gz" | xargs -I{} cp {} dist/
echo "Package files in dist directory:"
ls -la dist/
shell: bash
- name: Generate artifact attestation
if: ${{ steps.release.outputs.release_created }}
uses: actions/attest-build-provenance@v1
with:
subject-path: "dist/*"
# Publish to PyPI
- name: Publish to PyPI
if: ${{ steps.release.outputs.release_created }}
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing dist/*