-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (66 loc) · 1.91 KB
/
release.yml
File metadata and controls
66 lines (66 loc) · 1.91 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
name: Package Release
on:
push:
tags:
- "v*.*.*"
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Poetry
run: pip install poetry
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Update Poetry configuration
run: poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install --only dev --no-interaction
- name: Ruff Linter
run: poetry run ruff check src --exit-non-zero-on-fix
- name: Ruff Format
run: ruff format src --check
release-test:
runs-on: ubuntu-24.04
needs: lint
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Poetry
run: pip install poetry
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build the project
run: poetry build
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/
release:
runs-on: ubuntu-24.04
needs: lint
environment: production
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Poetry
run: pip install poetry
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build the project
run: poetry build
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}