Skip to content

Commit

Permalink
Merge pull request #694 from pypa/gha-packages
Browse files Browse the repository at this point in the history
Build & publish packages on Github actions
  • Loading branch information
takluyver authored Oct 18, 2024
2 parents e38b172 + 8736c4e commit c5b0261
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,36 @@ jobs:

- name: Codecov upload
run: codecov


packages:
runs-on: ubuntu-latest
needs: [test, test-py36]
permissions:
id-token: write # OIDC for uploading to PyPI

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build flit_core & flit packages
run: |
python flit_core/build_dists.py
python -m pip install .
python -m flit build
# Copy flit_core packages to same location
cp flit_core/dist/* dist/
- uses: actions/upload-artifact@v4
with:
name: packages
path: ./dist/*

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}

0 comments on commit c5b0261

Please sign in to comment.