Skip to content

Commit

Permalink
Using artifact for publish job (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreenathnair authored Jul 11, 2023
1 parent 1d6bef5 commit 3c100d4
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
path: dist/

documentation:
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -80,26 +80,21 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/_build/html


publish:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
continue-on-error: false
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }}-app
path: dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
continue-on-error: false

0 comments on commit 3c100d4

Please sign in to comment.