Skip to content

Commit bb92d8e

Browse files
Merge branch 'main' into workarena-dynamic-guidance
2 parents 9255345 + 0a785fb commit bb92d8e

File tree

34 files changed

+1701
-236
lines changed

34 files changed

+1701
-236
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Setup Python and uv'
2+
description: 'Setup Python 3.12 and install uv package manager'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Set up Python
7+
uses: actions/setup-python@v5
8+
with:
9+
python-version: "3.12"
10+
11+
- name: Install uv
12+
uses: astral-sh/setup-uv@v7
13+
with:
14+
# Install a specific version of uv.
15+
version: "0.9.17"
16+
enable-cache: true
17+
18+
- name: Create virtual environment
19+
shell: bash
20+
run: uv venv

.github/workflows/pypi.yml

Lines changed: 75 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ name: Build and Publish
55
on: [push, workflow_dispatch]
66

77
jobs:
8-
build:
9-
name: Build
10-
runs-on: ubuntu-22.04
8+
build:
9+
name: Build
10+
runs-on: ubuntu-22.04
1111

12-
steps:
12+
steps:
1313
- uses: actions/checkout@v4
1414

1515
- name: Set up Python
@@ -28,9 +28,14 @@ jobs:
2828

2929
- name: Build a binary wheel and a source tarball (browsergym-webarena)
3030
run: python3 -m build browsergym/webarena/ --outdir dist/
31+
3132
- name: Build a binary wheel and a source tarball (browsergym-webarenalite)
32-
run: python3 -m build browsergym/webarenalite/ --outdir dist/
33-
- name: Build a binary wheel and a source tarball (browsergym-webarena)
33+
run: python3 -m build browsergym/webarenalite/ --outdir dist/
34+
35+
- name: Build a binary wheel and a source tarball (browsergym-webarena-verified)
36+
run: python3 -m build browsergym/webarena_verified/ --outdir dist
37+
38+
- name: Build a binary wheel and a source tarball (browsergym-visualwebarena)
3439
run: python3 -m build browsergym/visualwebarena/ --outdir dist/
3540

3641
- name: Build a binary wheel and a source tarball (browsergym-assistantbench)
@@ -48,97 +53,81 @@ jobs:
4853
name: python-package-distributions
4954
path: dist/
5055

51-
publish-to-pypi:
52-
name: Publish to PyPI
53-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
54-
needs:
55-
- build
56-
runs-on: ubuntu-22.04
57-
environment: pypi
58-
permissions:
59-
id-token: write # IMPORTANT: mandatory for trusted publishing
60-
61-
steps:
62-
- name: Download all the distribution packages
63-
uses: actions/download-artifact@v4
64-
with:
65-
name: python-package-distributions
66-
path: dist/
67-
68-
- name: Publish all distribution packages to PyPI
69-
uses: pypa/gh-action-pypi-publish@release/v1
70-
71-
github-release:
72-
name: Sign packages with Sigstore and upload them to GitHub Release
73-
needs:
56+
publish-to-pypi:
57+
name: Publish to PyPI
58+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
59+
needs:
60+
- build
61+
runs-on: ubuntu-22.04
62+
environment: pypi
63+
permissions:
64+
id-token: write # IMPORTANT: mandatory for trusted publishing
65+
66+
steps:
67+
- name: Download all the distribution packages
68+
uses: actions/download-artifact@v4
69+
with:
70+
name: python-package-distributions
71+
path: dist/
72+
73+
- name: Publish all distribution packages to PyPI
74+
uses: pypa/gh-action-pypi-publish@release/v1
75+
76+
github-release:
77+
name: Create GitHub Release
78+
if: startsWith(github.ref, 'refs/tags/')
79+
needs:
7480
- publish-to-pypi
75-
runs-on: ubuntu-22.04
81+
runs-on: ubuntu-22.04
82+
permissions:
83+
contents: write
7684

77-
permissions:
78-
contents: write # IMPORTANT: mandatory for making GitHub Releases
79-
id-token: write # IMPORTANT: mandatory for sigstore
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v4
8088

81-
steps:
8289
- name: Download all the dists
8390
uses: actions/download-artifact@v4
8491
with:
8592
name: python-package-distributions
8693
path: dist/
8794

88-
- name: Sign the dists with Sigstore
89-
uses: sigstore/gh-action-sigstore-python@v3.1.0
90-
with:
91-
inputs: >-
92-
./dist/*.tar.gz
93-
./dist/*.whl
94-
9595
- name: Create GitHub Release
9696
env:
9797
GITHUB_TOKEN: ${{ github.token }}
98-
run: >-
99-
gh release create
100-
'${{ github.ref_name }}'
101-
--repo '${{ github.repository }}'
102-
--notes ""
103-
104-
- name: Upload artifact signatures to GitHub Release
105-
env:
106-
GITHUB_TOKEN: ${{ github.token }}
107-
# Upload to GitHub Release using the `gh` CLI.
108-
# `dist/` contains the built packages, and the
109-
# sigstore-produced signatures and certificates.
110-
run: >-
111-
gh release upload
112-
'${{ github.ref_name }}' dist/**
113-
--repo '${{ github.repository }}'
114-
115-
- name: Set GitHub Release as pre-release
116-
if: contains(github.ref, '.dev') # only set tags vA.B.C.devD as pre-release
98+
run: |
99+
gh release create '${{ github.ref_name }}' \
100+
dist/* \
101+
--repo '${{ github.repository }}' \
102+
--title "Release ${{ github.ref_name }}" \
103+
--generate-notes
104+
105+
- name: Set as pre-release if dev version
106+
if: contains(github.ref, '.dev')
117107
env:
118108
GITHUB_TOKEN: ${{ github.token }}
119-
run: >-
120-
gh release edit
121-
'${{ github.ref_name }}'
122-
--repo '${{ github.repository }}'
123-
--prerelease
124-
125-
# publish-to-testpypi:
126-
# name: Publish to TestPyPI
127-
# needs:
128-
# - build
129-
# runs-on: ubuntu-latest
130-
# environment: testpypi
131-
# permissions:
132-
# id-token: write # IMPORTANT: mandatory for trusted publishing
133-
134-
# steps:
135-
# - name: Download all the distribution packages
136-
# uses: actions/download-artifact@v4
137-
# with:
138-
# name: python-package-distributions
139-
# path: dist/
140-
141-
# - name: Publish distribution packages to TestPyPI
142-
# uses: pypa/gh-action-pypi-publish@release/v1
143-
# with:
144-
# repository-url: https://test.pypi.org/legacy/
109+
run: |
110+
gh release edit '${{ github.ref_name }}' \
111+
--repo '${{ github.repository }}' \
112+
--prerelease
113+
114+
# publish-to-testpypi:
115+
# name: Publish to TestPyPI
116+
# needs:
117+
# - build
118+
# runs-on: ubuntu-latest
119+
# environment: testpypi
120+
# permissions:
121+
# id-token: write # IMPORTANT: mandatory for trusted publishing
122+
123+
# steps:
124+
# - name: Download all the distribution packages
125+
# uses: actions/download-artifact@v4
126+
# with:
127+
# name: python-package-distributions
128+
# path: dist/
129+
130+
# - name: Publish distribution packages to TestPyPI
131+
# uses: pypa/gh-action-pypi-publish@release/v1
132+
# with:
133+
# repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)