Skip to content

Commit f736b79

Browse files
author
Victor Paleologue
committed
github.workflow: reconstruct current release URL from tag
Instead of relying on the "latest" release, we use the actual release tag to make sure to retrieve the right release. That does not work better for pre-releases, though.
1 parent 2d3cf56 commit f736b79

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/make_feed.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22
# Retrieves the latest release output to generate a QiToolchain XML feed.
33
set -e
4-
echo "Getting packages from current release at ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases/latest"
5-
ASSETS_URL=$(curl --silent "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases/latest" |
4+
RELEASE_URL="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases/${CURRENT_RELEASE_TAG}"
5+
echo "Getting packages from current release at $RELEASE_URL"
6+
ASSETS_URL=$(curl --silent $RELEASE_URL |
67
jq -r '.assets_url')
7-
PACKAGES_URLS=$(curl --silent ${ASSETS_URL} |
8+
PACKAGES_URLS=$(curl --silent $ASSETS_URL |
89
jq '.[] | .browser_download_url' |
910
grep .zip | xargs -L 1 echo) # echo removes the extra quotes
1011

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454

5555
- name: Make Feed # Outputs feed.xml
5656
run: .github/workflows/make_feed.sh
57+
env:
58+
CURRENT_RELEASE_TAG: ${{ steps.release.outputs.automatic_releases_tag }}
5759

5860
- name: Release Feed
5961
uses: actions/upload-release-asset@v1

0 commit comments

Comments
 (0)