generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (39 loc) · 991 Bytes
/
release.yml
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
name: Release
permissions:
contents: write
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install project
run: pip install -e .
- name: Install libraries
run: pip install -U build
- name: Create wheel
run: python -m build -o dist/ .
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Determine version
run: |
tag="${GITHUB_REF#refs/*/}"
version="${tag:1}"
echo "RELEASE_VERSION=${version}" >> $GITHUB_ENV
- name: Release on GitHub
uses: softprops/action-gh-release@v2
with:
files: dist/*
name: Version ${{ env.RELEASE_VERSION }}