Skip to content

Commit

Permalink
[gha] debug upload url
Browse files Browse the repository at this point in the history
  • Loading branch information
oxy86 committed Dec 4, 2024
1 parent 305a6b7 commit b003f7a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,34 @@ jobs:
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Determined build version ${{ env.VERSION }}
run: echo "VERSION is set to ${{ env.VERSION }}"
- name: Use script to get continuous release Upload URL
id: get_release
uses: actions/github-script@v6
with:
script: |
const { data: releases } = await github.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
});
const release = releases.find(r => r.tag_name === "continuous");
if (!release) {
throw new Error("Continuous release not found.");
}
core.setOutput("upload_url", release.upload_url);
result-encoding: string
- name: Fetch 'continuous' release upload URL
shell: bash
id: fetch_release
run: |
echo "steps.get_release.outputs.upload_url = ${{ steps.get_release.outputs.upload_url }}"
RELEASE_INFO=$(gh api -H "Accept: application/vnd.github+json" https://api.github.com/repos/${{ github.repository }}/releases/tags/continuous)

Check warning on line 105 in .github/workflows/build-ci.yml

View workflow job for this annotation

GitHub Actions / validate-yaml

105:151 [line-length] line too long (152 > 150 characters)
UPLOAD_URL=$(echo "$RELEASE_INFO" | jq -r '.upload_url' | sed 's/{?name,label}//')
echo "UPLOAD_URL=${UPLOAD_URL}" >> $GITHUB_ENV
echo "UPLOAD_URL=${UPLOAD_URL}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


#
# Install dependencies (build tools, cmake, etc)
#
Expand Down

0 comments on commit b003f7a

Please sign in to comment.