Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dustalov committed Jun 25, 2024
1 parent 8d66601 commit d7bac21
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ on:
pull_request:
branches: [ master ]

permissions:
actions: read
id-token: write
pages: write

concurrency:
group: pages
cancel-in-progress: false
Expand All @@ -19,8 +14,6 @@ jobs:
build:
runs-on: ubuntu-latest
environment: test
permissions:
id-token: write
continue-on-error: ${{ contains(matrix.python-version, 'pypy') }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -67,21 +60,43 @@ jobs:
uses: citation-file-format/[email protected]
with:
args: "--validate"
- name: Upload artifact
- name: Upload Jupyter
uses: actions/upload-pages-artifact@v3
with:
path: "./jupyter"
if: matrix.python-version == '3.12' && github.ref == 'refs/heads/master'
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload packages
uses: actions/upload-artifact@v3
with:
repository-url: https://test.pypi.org/legacy/
name: python-package-distributions
path: dist/
if: matrix.python-version == '3.12' && github.ref == 'refs/heads/master'
deploy:
pypi:
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
environment:
name: pypi
url: https://test.pypi.org/p/chinese-whispers
permissions:
id-token: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Download packages
uses: actions/download-artifact@v3
with:
name: packages
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
pages:
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
actions: read
id-token: write
pages: write
runs-on: ubuntu-latest
needs: build
steps:
Expand Down

0 comments on commit d7bac21

Please sign in to comment.