Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
0da0dcba
Unverified
Commit
0da0dcba
authored
Jan 31, 2024
by
Anjor Kanekar
Committed by
GitHub
Jan 31, 2024
Browse files
Publish to pypi (#1194)
* publish to pypi * lint * Update publish.yml * minor
parent
bd7d265a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
.github/workflows/publish.yml
.github/workflows/publish.yml
+75
-0
No files found.
.github/workflows/publish.yml
0 → 100644
View file @
0da0dcba
name
:
Publish Python distribution to PyPI
on
:
push
jobs
:
build
:
name
:
Build distribution
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Set up Python
uses
:
actions/setup-python@v4
with
:
python-version
:
"
3.x"
-
name
:
Install pypa/build
run
:
>-
python3 -m
pip install
build
--user
-
name
:
Build a binary wheel and a source tarball
run
:
python3 -m build
-
name
:
Store the distribution packages
uses
:
actions/upload-artifact@v3
with
:
name
:
python-package-distributions
path
:
dist/
publish-to-pypi
:
name
:
>-
Publish Python distribution to PyPI
if
:
startsWith(github.ref, 'refs/tags/')
# only publish to PyPI on tag pushes
needs
:
-
build
runs-on
:
ubuntu-latest
environment
:
name
:
pypi
url
:
https://pypi.org/p/lm_eval
permissions
:
id-token
:
write
# IMPORTANT: mandatory for trusted publishing
steps
:
-
name
:
Download all the dists
uses
:
actions/download-artifact@v3
with
:
name
:
python-package-distributions
path
:
dist/
-
name
:
Publish distribution to PyPI
uses
:
pypa/gh-action-pypi-publish@release/v1
publish-to-testpypi
:
name
:
Publish Python distribution to TestPyPI
needs
:
-
build
runs-on
:
ubuntu-latest
environment
:
name
:
testpypi
url
:
https://test.pypi.org/p/lm_eval
permissions
:
id-token
:
write
# IMPORTANT: mandatory for trusted publishing
steps
:
-
name
:
Download all the dists
uses
:
actions/download-artifact@v3
with
:
name
:
python-package-distributions
path
:
dist/
-
name
:
Publish distribution to TestPyPI
uses
:
pypa/gh-action-pypi-publish@release/v1
with
:
repository-url
:
https://test.pypi.org/legacy/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment