From fc0a402ece7a45397885512da788cc7418344ba1 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 7 Sep 2024 01:08:31 -0700 Subject: [PATCH] More release assets --- .github/workflows/ci.yml | 19 +++----- .github/workflows/github-release.yml | 66 ++++++++++++++++++++++++++++ README.md | 2 +- src/gdbdbg/__init__.py | 2 +- 4 files changed, 74 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/github-release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0839f72..c943972 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,6 +94,12 @@ jobs: create-release: name: Create Github Release + uses: ./.github/workflows/github-release.yml + if: ${{ inputs.kind == 'release' && success() }} + needs: + - build-python-package + - deploy-python-package + runs-on: ubuntu-latest permissions: contents: write @@ -101,19 +107,6 @@ jobs: 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: "v${{ needs.build-python-package.outputs.version }}" - release_name: "Release v${{ needs.build-python-package.outputs.version }}" - 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 diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 0000000..63ea59e --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,66 @@ +name: Create Github Release + +on: workflow_call + +jobs: + release: + name: Publish Python Wheel + runs-on: ubuntu-latest + steps: + - name: Download Source Tarball + uses: actions/download-artifact@v4 + with: + name: Source Tarball + path: dist + + - name: Download x86 Python Package Artifacts + uses: actions/download-artifact@v4 + with: + name: Python Wheel x86_64 + path: dist + + - name: Download arm64 Python Package Artifacts + uses: actions/download-artifact@v4 + with: + name: Python Wheel aarch64 + path: dist + + - 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: "v${{ needs.build-python-package.outputs.version }}" + release_name: "Release v${{ needs.build-python-package.outputs.version }}" + body: | + Release ${{ needs.build-python-package.outputs.version }} + draft: false + prerelease: false + + - name: Upload Source Tarball + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: dist/*.tar.gz + + - name: Upload x86-64 Wheel + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: dist/*x86_64.whl + + - name: Upload arm64 Wheel + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: dist/*aarch64.whl diff --git a/README.md b/README.md index 187d6e5..1b592dd 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,5 @@ manhole.install() And inject it with gdbdbg-inject: ``` -gdbdbg manhole.py +gdbdbg-inject manhole.py ``` diff --git a/src/gdbdbg/__init__.py b/src/gdbdbg/__init__.py index 4c25c8c..6c72365 100644 --- a/src/gdbdbg/__init__.py +++ b/src/gdbdbg/__init__.py @@ -1,4 +1,4 @@ # Copyright 2024 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 -__version__ = "0.2.0" +__version__ = "0.2.1"