diff --git a/.github/workflows/CI_publish_release.yml b/.github/workflows/CI_publish_release.yml index 522e085..afabe91 100644 --- a/.github/workflows/CI_publish_release.yml +++ b/.github/workflows/CI_publish_release.yml @@ -44,6 +44,7 @@ jobs: echo "::error ::RELEASE_TAG variable is empty. Aborting." exit 1 fi + echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_OUTPUT # Get information for this tagged release tagged_release_id="${{ github.event.release.id }}" @@ -65,11 +66,13 @@ jobs: id: download env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + RELEASE_TAG: ${{ steps.settings.outputs.RELEASE_TAG }} SF_FILE_PATH: ${{ steps.settings.outputs.SF_FILE_PATH }} working-directory: '${{ github.workspace }}/release_assets/${{ steps.settings.outputs.SF_FILE_PATH }}' run: | # Download all release assets - echo "${RELEASE_CONTEXT}" | jq -r '.assets[] | "\(.name)\n\(.url)"' | xargs -r -n2 sh -c 'curl -H "Accept: application/octet-stream" -H "Authorization: token ${GITHUB_TOKEN}" -Lf -o "$1" "$2"' sh + gh release download "${RELEASE_TAG}" # Output list of downloaded files ls -al echo "Done." @@ -77,9 +80,10 @@ jobs: id: latestrelease env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} run: | echo "Get Latest Release info for repo: ${GITHUB_REPOSITORY}" - latest_release_id="$(curl -H "Accept: application/vnd.github.v3.raw" -H "Authorization: token ${GITHUB_TOKEN}" -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest" | jq '.id')" + latest_release_id="$(gh release view --json "id" --jq '.id')" echo "latest_release_id=${latest_release_id}" echo "latest_release_id=${latest_release_id}" >> $GITHUB_OUTPUT - name: Set up SourceForge known_hosts diff --git a/.github/workflows/CI_windows.yml b/.github/workflows/CI_windows.yml index 94e9dac..5936c01 100644 --- a/.github/workflows/CI_windows.yml +++ b/.github/workflows/CI_windows.yml @@ -156,11 +156,12 @@ jobs: env: APPCONFIG_VERSIONCHECK_ARCH: x64 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} run: | - curl -H "Accept: application/vnd.github.v3.raw" -H "Authorization: token ${GITHUB_TOKEN}" -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest" > "latest.json" + gh release view --json "id,tagName,body" > "latest.json" latest_release_id="$(cat "latest.json" | jq -r '.id')" echo "latest_release_id=${latest_release_id}" - latest_release_tagname="$(cat "latest.json" | jq -r '.tag_name')" + latest_release_tagname="$(cat "latest.json" | jq -r '.tagName')" echo "latest_release_tagname=${latest_release_tagname}" # Remove "v/" or "v" prefix (as in "v3.2.2"), if present latest_version="$(echo "${latest_release_tagname}" | sed -e 's:^v/::' -e 's:^v::')" @@ -280,17 +281,12 @@ jobs: fi - name: 'Auto-Release' if: success() && (steps.config.outputs.AUTO_RELEASE == 'true') - uses: past-due/action-gh-release@master - with: - tag_name: 'v${{ steps.next-semver.outputs.NEXT_SEMVER }}' - name: '${{ steps.next-semver.outputs.NEXT_SEMVER }}' - files: | - ./dl/artifacts/*/*.zip - ./dl/artifacts/BUILD_INFO.md - draft: false - body_path: ./dl/artifacts/BUILD_INFO.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + next_semver: '${{ steps.next-semver.outputs.NEXT_SEMVER }}' + run: | + gh release create "v${next_semver}" --title "${next_semver}" -F "./dl/artifacts/BUILD_INFO.md" ./dl/artifacts/*/*.zip ./dl/artifacts/BUILD_INFO.md # ********************************************** # Mirror to SourceForge # **********************************************