Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit b45daa5

Browse files
committed
setup workflows
1 parent 88590f6 commit b45daa5

File tree

8 files changed

+81
-371
lines changed

8 files changed

+81
-371
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish to PyPI and update files
2+
3+
# GitHub events that triggers the workflow:
4+
on:
5+
release:
6+
types:
7+
- published
8+
9+
jobs:
10+
call_tests_workflow:
11+
name: Test
12+
uses: ./.github/workflows/test.yaml
13+
14+
publish:
15+
name: Publish to PyPI
16+
needs: [call_tests_workflow]
17+
runs-on: ubuntu-latest
18+
environment: release
19+
20+
permissions:
21+
id-token: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: recursive
27+
28+
- name: Install Hatch
29+
uses: pypa/hatch@install
30+
31+
- name: Check if the release tag matches the version
32+
uses: samuelcolvin/[email protected]
33+
with:
34+
version_file_path: rendercv_tinytex/__init__.py
35+
36+
- name: Build
37+
run: |
38+
hatch build
39+
40+
- name: Upload package to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
3+
# GitHub events that triggers the workflow:
4+
on:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
branches: ["main"]
9+
workflow_call: # to make the workflow triggerable from other workflows (publish-to-pypi.yaml)
10+
workflow_dispatch: # to make the workflow triggerable manually
11+
12+
# The workflow:
13+
jobs:
14+
test:
15+
name: Test with Py${{ matrix.python-version }} on ${{ matrix.os }}
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu, windows, macos]
21+
python-version: ["3.10", "3.11", "3.12", "3.13"]
22+
23+
runs-on: ${{ matrix.os }}-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
29+
- name: Install Hatch
30+
uses: pypa/hatch@install
31+
32+
- name: Test
33+
run: hatch run test.py${{ matrix.python-version }}:test

rendercv_tinytex/tinytex-release/LICENSE.txt renamed to LICENSE.txt

File renamed without changes.

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ lint = "ruff check" # hatch run
4545
check-types = "pyright rendercv_tinytex" # hatch run check-types
4646
test = "pytest tests" # hatch run test
4747

48+
[tool.hatch.envs.test]
49+
template = "default"
50+
[[tool.hatch.envs.test.matrix]]
51+
python = ["3.10", "3.11", "3.12", "3.13"]
4852

4953
# ======================================================================================
5054
# Virtual Environments Above ===========================================================

rendercv_tinytex/tinytex-release/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

rendercv_tinytex/tinytex-release/README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)