diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 30e4258..0944853 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -14,6 +14,11 @@ on: description: Create a (pre-)release when CI passes default: false required: false + outputs: + tag: + description: "The created release tag" + value: ${{ jobs.github-release.outputs.tag }} + # run this workflow manually from the Actions tab workflow_dispatch: inputs: @@ -28,7 +33,6 @@ concurrency: cancel-in-progress: true jobs: - build-python: runs-on: ubuntu-latest outputs: @@ -68,7 +72,7 @@ jobs: needs: build-python strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ ubuntu-latest, macos-latest, windows-latest ] python: ["3.11", "3.12", "3.13"] fail-fast: false runs-on: ${{ matrix.os }} @@ -101,6 +105,8 @@ jobs: permissions: contents: write runs-on: ubuntu-latest + outputs: + tag: ${{ steps.tag.outputs.tag }} steps: - name: Setup Python 3.13 uses: actions/setup-python@v5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f46c26..ef80b6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,22 +64,13 @@ jobs: if: (github.event_name == 'workflow_dispatch' && inputs.create_release) || github.event_name == 'push' steps: - - name: Download assets from GitHub release - uses: robinraju/release-downloader@v1 - with: - repository: ${{ github.repository }} - # download the latest release - latest: true - # don't download pre-releases - preRelease: false - fileName: "*" - # don't download GitHub-generated source tar and zip files - tarBall: false - zipBall: false - # create a directory to store the downloaded assets - out-file-path: assets-to-publish - # don't extract downloaded files - extract: false + - name: Download assets from latest GitHub release using gh CLI + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir -p assets-to-publish + release_tag="${{ needs.build-test-release.outputs.tag }}" + gh release download "$release_tag" --repo "$GITHUB_REPOSITORY" --dir assets-to-publish - name: List downloaded assets run: ls -la assets-to-publish