-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (38 loc) · 1.37 KB
/
release.yml
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
on:
- workflow_dispatch
name: Release Packages
permissions:
contents: write
jobs:
build:
name: Create the package
runs-on: ubuntu-latest
environment: github_release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.13"
- id: build
run: ./tools/uv build
- id: version
run: |
version=$(python -c "import runpy; print(runpy.run_path('alt_pytest_asyncio/version.py')['VERSION'])")
versiondash=$(python -c "import runpy; print(runpy.run_path('alt_pytest_asyncio/version.py')['VERSION'].replace('.', '-'))")
echo "version=$version" >> $GITHUB_OUTPUT
echo "versiondash=$versiondash" >> $GITHUB_OUTPUT
- id: create-release
uses: softprops/action-gh-release@v2
with:
name: alt_pytest_asyncio ${{ steps.version.outputs.version }}
body: "https://github.com/delfick/python-alt_pytest_asyncio#release-${{ steps.version.outputs.versiondash }}"
tag_name: "release-${{ steps.version.outputs.version }}"
fail_on_unmatched_files: true
draft: false
prerelease: false
files: "dist/*"
- uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN_CORE }}
packages_dir: dist