-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (45 loc) · 1.47 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (45 loc) · 1.47 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
# SPDX-FileCopyrightText: Copyright (c) Siemens AG 2019-2025 ALL RIGHTS RESERVED
# SPDX-License-Identifier: MIT
name: PyPI release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
call-build-and-test-workflow:
uses:
./.github/workflows/build-and-test.yml
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/siemens-standard-bom
permissions:
id-token: write
needs: call-build-and-test-workflow
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
cache: poetry
cache-dependency-path: poetry.lock
- name: Set Poetry environment
run: |
poetry env use 3.10
- name: Install dependencies
run: |
poetry install --sync --no-interaction
- name: Package project
run: |
poetry build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist