-
-
Notifications
You must be signed in to change notification settings - Fork 48
31 lines (28 loc) · 766 Bytes
/
release.yml
File metadata and controls
31 lines (28 loc) · 766 Bytes
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
name: Release
on:
push:
tags:
- "*"
jobs:
release-pypi:
name: release-pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build artifacts
run: |
pipx run build
- name: Test Build
run: |
python3 -m venv fresh_env
. fresh_env/bin/activate
pip install dist/*.whl
output=$(echo '# hello world' | fresh_env/bin/marko | xargs)
[[ $output == "<h1>hello world</h1>" ]] || false
- name: Upload to Pypi
run: |
pipx run twine upload --username __token__ --password ${{ secrets.PYPI_TOKEN }} dist/*