Skip to content

Commit 9c28963

Browse files
authored
Simplify and fix pre-release downloads (#74)
* Fix pre-release downloads Signed-off-by: Thijs Baaijen <[email protected]> * put outputs under workflow_call Signed-off-by: Thijs Baaijen <[email protected]> * sue value/description Signed-off-by: Thijs Baaijen <[email protected]> * fix indentation issue Signed-off-by: Thijs Baaijen <[email protected]> * disable test needs for now Signed-off-by: Thijs Baaijen <[email protected]> * disable mac & windows for now Signed-off-by: Thijs Baaijen <[email protected]> * enable mac & windows again Signed-off-by: Thijs Baaijen <[email protected]> --------- Signed-off-by: Thijs Baaijen <[email protected]>
1 parent 054e7bf commit 9c28963

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

.github/workflows/build-test-release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
description: Create a (pre-)release when CI passes
1515
default: false
1616
required: false
17+
outputs:
18+
tag:
19+
description: "The created release tag"
20+
value: ${{ jobs.github-release.outputs.tag }}
21+
1722
# run this workflow manually from the Actions tab
1823
workflow_dispatch:
1924
inputs:
@@ -28,7 +33,6 @@ concurrency:
2833
cancel-in-progress: true
2934

3035
jobs:
31-
3236
build-python:
3337
runs-on: ubuntu-latest
3438
outputs:
@@ -68,7 +72,7 @@ jobs:
6872
needs: build-python
6973
strategy:
7074
matrix:
71-
os: [ubuntu-latest, macos-latest, windows-latest]
75+
os: [ ubuntu-latest, macos-latest, windows-latest ]
7276
python: ["3.11", "3.12", "3.13"]
7377
fail-fast: false
7478
runs-on: ${{ matrix.os }}
@@ -101,6 +105,8 @@ jobs:
101105
permissions:
102106
contents: write
103107
runs-on: ubuntu-latest
108+
outputs:
109+
tag: ${{ steps.tag.outputs.tag }}
104110
steps:
105111
- name: Setup Python 3.13
106112
uses: actions/setup-python@v5

.github/workflows/ci.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,13 @@ jobs:
6464
if: (github.event_name == 'workflow_dispatch' && inputs.create_release) || github.event_name == 'push'
6565

6666
steps:
67-
- name: Download assets from GitHub release
68-
uses: robinraju/release-downloader@v1
69-
with:
70-
repository: ${{ github.repository }}
71-
# download the latest release
72-
latest: true
73-
# don't download pre-releases
74-
preRelease: false
75-
fileName: "*"
76-
# don't download GitHub-generated source tar and zip files
77-
tarBall: false
78-
zipBall: false
79-
# create a directory to store the downloaded assets
80-
out-file-path: assets-to-publish
81-
# don't extract downloaded files
82-
extract: false
67+
- name: Download assets from latest GitHub release using gh CLI
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
run: |
71+
mkdir -p assets-to-publish
72+
release_tag="${{ needs.build-test-release.outputs.tag }}"
73+
gh release download "$release_tag" --repo "$GITHUB_REPOSITORY" --dir assets-to-publish
8374
8475
- name: List downloaded assets
8576
run: ls -la assets-to-publish

0 commit comments

Comments
 (0)