-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 2.06 KB
/
release.yml
File metadata and controls
75 lines (61 loc) · 2.06 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
name: Release
on:
release:
types: [published]
permissions:
id-token: write # for OIDC
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: "Build test containers"
run: make build
- name: "Create environment file"
run: env | grep -E '^MPT_' > .env
env:
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
RP_API_KEY: ${{ secrets.RP_API_KEY }}
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}
MPT_API_TOKEN_CLIENT: ${{ secrets.MPT_API_TOKEN_CLIENT }}
MPT_API_TOKEN_OPERATIONS: ${{ secrets.MPT_API_TOKEN_OPERATIONS }}
MPT_API_TOKEN_VENDOR: ${{ secrets.MPT_API_TOKEN_VENDOR }}
- name: "Run E2E test"
continue-on-error: true
run: make e2e args="--reportportal --rp-launch=$RP_LAUNCH --rp-api-key=$RP_API_KEY --rp-endpoint=$RP_ENDPOINT -o rp_launch_attributes=\"$RP_LAUNCH_ATTR\""
env:
RP_LAUNCH: mpt-api-client-e2e
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
RP_API_KEY: ${{ secrets.RP_API_KEY }}
RP_LAUNCH_ATTR: ref:${{ github.ref }} event_name:${{ github.event_name }}
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: "Install uv"
uses: astral-sh/setup-uv@v7
with:
version: "0.7.*"
enable-cache: true
cache-dependency-glob: uv.lock
- name: "Get the version"
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
- name: "Build"
run: |
uv version ${{ steps.get_version.outputs.VERSION }}
uv build
- name: "Publish to PyPI"
run: uv publish
dtrack:
uses: softwareone-platform/ops-template/.github/workflows/dependency-track-python-uv.yml@v2
with:
projectName: 'mpt-api-python-client'
secrets:
DEPENDENCYTRACK_APIKEY: ${{ secrets.DEPENDENCYTRACK_APIKEY }}