-
Notifications
You must be signed in to change notification settings - Fork 37
71 lines (66 loc) · 2.22 KB
/
release.yaml
File metadata and controls
71 lines (66 loc) · 2.22 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
---
name: Release
on:
push:
tags:
- "*"
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
release-pypi:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Setting up PDM
uses: pdm-project/setup-pdm@94a823180e06fcde4ad29308721954a521c96ed0 # v4
with:
python-version: "3.10"
architecture: x64
- name: Setting up nox
uses: wntrblm/nox@a74da2c766d4e656d6105639926c31f3aa4a6ca1 # 2025.02.09
with:
python-versions: "3.10"
- name: Configure Git Credentials
run: |
git config user.email "action@github.com"
git config user.name "GitHub Action"
- name: Bumping version
run: |
nox -s bump -- to "${{ github.ref_name }}"
- name: Build artifacts
run: |
nox -s build
- name: Test Build
run: |
python -m pip install dist/*.whl
eva --version
- name: Build Release Docs
run: |
git fetch origin gh-pages:gh-pages
tag="${{ github.ref_name }}"
DOC_VERSION=${tag%.*}
nox -s docs -- deploy --alias-type=copy --update-aliases "$DOC_VERSION"
git push origin gh-pages
- name: Publish package distributions to PyPI
run: nox -s publish -- --no-build
env:
PDM_PUBLISH_USERNAME: ${{ secrets.PYPI_USERNAME }}
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Create Pull Request for version bump
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: bump version to ${{ github.ref_name }}"
title: "bump version to ${{ github.ref_name }} [skip ci]"
body: |
This PR updates the pyproject.toml with the new version number.
Version: ${{ github.ref_name }}
*Automated PR created by the Release workflow*
branch: bump-version-${{ github.ref_name }}
base: main