Skip to content

Commit

Permalink
Merge pull request #508 from allenai/fix-publish
Browse files Browse the repository at this point in the history
Update publish workflow to trusted publisher
  • Loading branch information
dakinggg authored Mar 8, 2024
2 parents cc757cd + dacb6ec commit 29b1e46
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ on:
types: [published]

jobs:
deploy:

if: github.repository == 'allenai/scispacy'
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest

permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
run: |
python setup.py sdist bdist_wheel
twine upload -u scispacy -p ${{ secrets.PYPI_PASSWORD }} dist/*
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion scripts/install_remote_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def main():
s3_prefix = "https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.5.3/"
s3_prefix = "https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.5.4/"
model_names = [
"en_core_sci_sm",
"en_core_sci_md",
Expand Down

0 comments on commit 29b1e46

Please sign in to comment.