diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 7a8e380..44edf0f 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -17,6 +17,7 @@ jobs: outputs: releases_created: ${{ steps.release-please.outputs.releases_created }} tag: ${{ steps.release-please.outputs.tag_name }} + upload_url: ${{ steps.release-please.outputs.upload_url }} steps: - uses: google-github-actions/release-please-action@v3 id: release-please @@ -49,9 +50,18 @@ jobs: with: spec_file: "pkg/rpm.spec" - name: Upload release binaries - uses: ublue-os/upload-assets@pass-in-tag - env: - GITHUB_TOKEN: ${{ github.token }} - with: - asset_paths: '["./${{ steps.rpm_build.outputs.source_rpm_path }}*", "./${{ steps.rpm_build.outputs.rpm_dir_path }}noarch/*"]' - tag: ${{ needs.release-please.outputs.tag }} + run: | + AUTH_HEADER="Authorization: token ${{ github.token }}" + + for f in $(ls ${{ steps.rpm_build.outputs.rpm_dir_path }}noarch/); do + fpath="${{ steps.rpm_build.outputs.rpm_dir_path }}noarch/$f" + echo $fpath + CONTENT_LENGTH_HEADER="Content-Length: $(stat -c%s "${fpath}")" + CONTENT_TYPE_HEADER="Content-Type: application/octet-stream" + curl -f -sSL -XPOST \ + -H "${AUTH_HEADER}" \ + -H "${CONTENT_LENGTH_HEADER}" \ + -H "${CONTENT_TYPE_HEADER}" \ + --upload-file "${fpath}" \ + "${{ needs.release-please.outputs.upload_url }}?name=${f}" + done