Skip to content

Commit

Permalink
ci: Configure publisher permissions for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jun 14, 2024
1 parent fd7b57b commit 2f64c60
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/argilla-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ concurrency:
cancel-in-progress: true

on:
workflow_dispatch:
workflow_call:

push:
paths:
- argilla-v1/**
Expand Down Expand Up @@ -116,6 +113,15 @@ jobs:
publish_release:
name: Publish Release
runs-on: ubuntu-latest
# if: ${{ github.event_name == 'release' }}

permissions:
# This permission is needed for private repositories.
# contents: read
# IMPORTANT: this permission is mandatory for trusted publishing on PyPI
id-token: write
# This permission is needed for creating tags
contents: write

needs:
- build
Expand All @@ -137,15 +143,10 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
with:
user: __token__
password: ${{ secrets.AR_TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
- name: Test Installing 🍿
continue-on-error: true
run: pip install --index-url https://test.pypi.org/simple --no-deps $PACKAGE_NAME==$PACKAGE_VERSION
- name: Publish Package to PyPI 🥩
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event_name == 'release' }}
with:
user: __token__
password: ${{ secrets.AR_PYPI_API_TOKEN }}

0 comments on commit 2f64c60

Please sign in to comment.