forked from canonical/operator
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.07 KB
/
test-publish-ops.yaml
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
name: Test Publish (ops)
on: [workflow_dispatch, workflow_call]
jobs:
framework-tests:
uses: ./.github/workflows/framework-tests.yaml
observability-charm-tests:
uses: ./.github/workflows/observability-charm-tests.yaml
hello-charm-tests:
uses: ./.github/workflows/hello-charm-tests.yaml
build-n-publish:
name: Build and Publish ops to Test PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
contents: read
needs: [framework-tests, observability-charm-tests, hello-charm-tests]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
- name: Install build dependencies
run: pip install wheel build
- name: Build
run: python -m build
- name: Attest build provenance
uses: actions/[email protected]
with:
subject-path: 'dist/*'
- name: Publish to test.pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/