diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40ca50a..383e6f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,8 +72,7 @@ jobs: - pre-commit with: kind: "${{ inputs.kind }}" - cmd: python -m build - #cmd: "${{ inputs.package_command }}" + cmd: "${{ inputs.package_command }}" test: name: Test @@ -112,6 +111,29 @@ jobs: tag: "v${{ needs.build-python-package.outputs.version }}" message: "Version ${{ needs.build-python-package.outputs.version }}" + create-release: + name: Push Version Tag + runs-on: ubuntu-latest + permissions: + contents: write + if: ${{ inputs.kind == 'release' && success() }} + needs: + - build-python-package + - deploy-python-package + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Release ${{ needs.build-python-package.outputs.version }} + draft: false + prerelease: false + set-pipeline-exit-status: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all diff --git a/.github/workflows/deploy-package-action.yml b/.github/workflows/deploy-package-action.yml index 27605e1..a9cfa4a 100644 --- a/.github/workflows/deploy-package-action.yml +++ b/.github/workflows/deploy-package-action.yml @@ -1,4 +1,4 @@ -name: Relenv Python Package +name: ppbt Python Package on: workflow_call: @@ -11,12 +11,20 @@ jobs: name: Publish Python Wheel runs-on: ubuntu-latest steps: - - name: Download Python Package Artifacts - uses: actions/download-artifact@v3 - with: - name: dist - path: dist - - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} + - name: Download x86 Python Package Artifacts + uses: actions/download-artifact@v3 + with: + name: dist-x86_64 + path: dist + + - name: Download arm64 Python Package Artifacts + uses: actions/download-artifact@v3 + with: + name: dist-aarch64 + path: dist + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + name: Create Release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c458a7..3e799f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,9 +20,11 @@ on: jobs: ci: name: CI + environment: release permissions: contents: write pull-requests: read + id-token: write uses: ./.github/workflows/ci.yml if: contains('["dwoz", "twangboy", "dmurphy18"]', github.actor) with: