-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (50 loc) · 1.31 KB
/
release.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
name: Release
on:
pull_request:
push:
tags:
- "*"
jobs:
release-pypi:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Setting up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
architecture: x64
- name: Check prerelease
id: check_version
run: |
if [[ "${{ github.ref }}" =~ ^refs/tags/[0-9.]+$ ]]; then
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
else
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
fi
- name: Setting up nox
uses: wntrblm/[email protected]
with:
python-versions: "3.10"
- name: Build artifacts
run: |
nox -s build
- name: Test Build
run: |
python -m pip install dist/*.whl
eva --version
- name: Publish package distributions to PyPI
run: pdm publish --no-build
- name: Create Release
uses: actions/create-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ github.ref }}
draft: true
prerelease: ${{ steps.check_version.outputs.PRERELEASE }}