@@ -5,11 +5,11 @@ name: Build and Publish
55on : [push, workflow_dispatch]
66
77jobs :
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,12 +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-
33+ run : python3 -m build browsergym/webarenalite/ --outdir dist/
34+
3435 - name : Build a binary wheel and a source tarball (browsergym-webarena-verified)
3536 run : python3 -m build browsergym/webarena_verified/ --outdir dist
36- - name : Build a binary wheel and a source tarball (browsergym-webarena)
37+
38+ - name : Build a binary wheel and a source tarball (browsergym-visualwebarena)
3739 run : python3 -m build browsergym/visualwebarena/ --outdir dist/
3840
3941 - name : Build a binary wheel and a source tarball (browsergym-assistantbench)
@@ -51,97 +53,81 @@ jobs:
5153 name : python-package-distributions
5254 path : dist/
5355
54- publish-to-pypi :
55- name : Publish to PyPI
56- if : startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
57- needs :
58- - build
59- runs-on : ubuntu-22.04
60- environment : pypi
61- permissions :
62- id-token : write # IMPORTANT: mandatory for trusted publishing
63-
64- steps :
65- - name : Download all the distribution packages
66- uses : actions/download-artifact@v4
67- with :
68- name : python-package-distributions
69- path : dist/
70-
71- - name : Publish all distribution packages to PyPI
72- uses : pypa/gh-action-pypi-publish@release/v1
73-
74- github-release :
75- name : Sign packages with Sigstore and upload them to GitHub Release
76- 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 :
7780 - publish-to-pypi
78- runs-on : ubuntu-22.04
81+ runs-on : ubuntu-22.04
82+ permissions :
83+ contents : write
7984
80- permissions :
81- contents : write # IMPORTANT: mandatory for making GitHub Releases
82- id-token : write # IMPORTANT: mandatory for sigstore
85+ steps :
86+ - name : Checkout code
87+ uses : actions/checkout@v4
8388
84- steps :
8589 - name : Download all the dists
8690 uses : actions/download-artifact@v4
8791 with :
8892 name : python-package-distributions
8993 path : dist/
9094
91- - name : Sign the dists with Sigstore
92- 93- with :
94- inputs : >-
95- ./dist/*.tar.gz
96- ./dist/*.whl
97-
9895 - name : Create GitHub Release
9996 env :
10097 GITHUB_TOKEN : ${{ github.token }}
101- run : >-
102- gh release create
103- '${{ github.ref_name }}'
104- --repo '${{ github.repository }}'
105- --notes ""
106-
107- - name : Upload artifact signatures to GitHub Release
108- env :
109- GITHUB_TOKEN : ${{ github.token }}
110- # Upload to GitHub Release using the `gh` CLI.
111- # `dist/` contains the built packages, and the
112- # sigstore-produced signatures and certificates.
113- run : >-
114- gh release upload
115- '${{ github.ref_name }}' dist/**
116- --repo '${{ github.repository }}'
117-
118- - name : Set GitHub Release as pre-release
119- 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')
120107 env :
121108 GITHUB_TOKEN : ${{ github.token }}
122- run : >-
123- gh release edit
124- '${{ github.ref_name }}'
125- --repo '${{ github.repository }}'
126- --prerelease
127-
128- # publish-to-testpypi:
129- # name: Publish to TestPyPI
130- # needs:
131- # - build
132- # runs-on: ubuntu-latest
133- # environment: testpypi
134- # permissions:
135- # id-token: write # IMPORTANT: mandatory for trusted publishing
136-
137- # steps:
138- # - name: Download all the distribution packages
139- # uses: actions/download-artifact@v4
140- # with:
141- # name: python-package-distributions
142- # path: dist/
143-
144- # - name: Publish distribution packages to TestPyPI
145- # uses: pypa/gh-action-pypi-publish@release/v1
146- # with:
147- # 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