diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 1387ff43..f02b7981 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -9,7 +9,7 @@ on: jobs: run-tests: - name: Build and test + name: Run tests strategy: matrix: python-version: ['3.10', '3.11', '3.12'] @@ -29,8 +29,8 @@ jobs: cd tests pytest --cov-report term-missing:skip-covered --cov=qermit --durations=10 - publish: - name: Test publication + build-distribution: + name: Build distribution runs-on: ubuntu-latest steps: @@ -46,8 +46,14 @@ jobs: - name: Install Poetry uses: snok/install-poetry@v1 - - name: Publish Qermit Dry Run - run: poetry publish -u __token__ -p ${{ secrets.PYPI_RELEASE_TOKEN }} --build --skip-existing --dry-run + - name: Build Qermit + run: poetry build + + - name: Save build + uses: actions/upload-artifact@v4 + with: + name: build + path: dist build-docs: name: Test documentation build diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 25d32750..0e2f8643 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,11 @@ concurrency: jobs: Release: + name: Build and release runs-on: ubuntu-latest + + permissions: + id-token: write steps: @@ -27,6 +31,9 @@ jobs: - name: Install Poetry uses: snok/install-poetry@v1 + + - name: Build Qermit + run: poetry build - - name: Publish Qermit - run: poetry publish -u __token__ -p ${{ secrets.PYPI_RELEASE_TOKEN }} --build \ No newline at end of file + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1