-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (37 loc) · 1.03 KB
/
publish-pypi.yml
File metadata and controls
45 lines (37 loc) · 1.03 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
name: Publish to PyPI
on:
release:
types: [published]
permissions:
contents: read
actions: write
id-token: write # Required for trusted publishing
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/webarena-verified
steps:
- name: Validate version tag
run: |
TAG="${{ github.event.release.tag_name }}"
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]; then
echo "::error::Invalid version tag format: $TAG"
echo "Expected format: v1.2.3 or v1.2.3-rc.1"
exit 1
fi
echo "Valid version tag: $TAG"
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup
with:
sync-args: --group dev
- name: Build package
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1