From 1cb89e8a88a66c92c8dad8c9cbf1d7d282c0d4b4 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Mon, 29 Apr 2024 11:48:50 +0200 Subject: [PATCH] cleanup --- .github/scripts/upload_gh_asset.sh | 12 -------- .github/scripts/upload_gh_asset_win.sh | 13 --------- .github/workflows/release.yml | 40 ++------------------------ 3 files changed, 2 insertions(+), 63 deletions(-) delete mode 100755 .github/scripts/upload_gh_asset.sh delete mode 100755 .github/scripts/upload_gh_asset_win.sh diff --git a/.github/scripts/upload_gh_asset.sh b/.github/scripts/upload_gh_asset.sh deleted file mode 100755 index 262eef3b9d..0000000000 --- a/.github/scripts/upload_gh_asset.sh +++ /dev/null @@ -1,12 +0,0 @@ -IFS=',' read -ra ASSETS <<< "$3" -url="$2" -url=${url%%\{*} -for ASSET in "${ASSETS[@]}"; do - ASSET_NAME=$(basename $ASSET) - curl \ - -H "Authorization: Bearer $1" \ - -H "Content-Type: $(file -b --mime-type $ASSET)" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - --data-binary @"$ASSET" \ - "$url?name=$ASSET_NAME" -done \ No newline at end of file diff --git a/.github/scripts/upload_gh_asset_win.sh b/.github/scripts/upload_gh_asset_win.sh deleted file mode 100755 index a0e838fe4f..0000000000 --- a/.github/scripts/upload_gh_asset_win.sh +++ /dev/null @@ -1,13 +0,0 @@ -IFS=',' read -ra ASSETS <<< "$4" -url="$3" -url=${url%%\{*} -for ASSET in "${ASSETS[@]}"; do - ASSET_NAME=$(basename $ASSET) - CONTENT_LENGTH=$(wc -c <"$ASSET") - curl \ - -H "Authorization: Bearer $2" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -H "Content-Length: $CONTENT_LENGTH" \ - -F "file=@$ASSET;type=$(file -b --mime-type $ASSET)" \ - "$url?name=$ASSET_NAME" -done \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a30ed7222..9df233e2a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,8 +18,6 @@ on: push: tags: - "v*" - branches: - - arqu/release_windows concurrency: group: release-${{ github.workflow }}-${{ github.ref }} @@ -32,7 +30,7 @@ env: MSRV: "1.75" SCCACHE_CACHE_SIZE: "50G" BIN_NAMES: "iroh,iroh-relay,iroh-dns-server" - RELEASE_VERSION: "v0.14.1-test" + RELEASE_VERSION: ${{ github.event.inputs.release_version }} jobs: create-release: @@ -249,43 +247,9 @@ jobs: } $ASSETS = $ASSETS -join ',' Add-Content -Path $env:GITHUB_ENV -Value "ASSET=$ASSETS" - - - name: Install file - shell: bash - if: ${{ startsWith(matrix.os, 'ubuntu') }} - run: sudo apt update && sudo apt install -y file - - # - name: Upload release archives - # if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os != 'windows-latest' - # shell: bash - # run: .github/scripts/upload_gh_asset.sh "${{ secrets.GITHUB_TOKEN }}" "${{ needs.create-release.outputs.upload_url }}" "${{ env.ASSET }}" - - # - name: Upload release archives (windows) - # if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os == 'windows-latest' - # # This exists purely because the GH runners don't properly escape the path to the bash script and the WSL fails to run it. - # shell: pwsh - # run: bash .github/scripts/upload_gh_asset_win.sh "${{ secrets.GITHUB_TOKEN }}" "" "${{ env.ASSET }}" - - uses: n0-computer/actions-upload-release-asset@arqu/multi_ul + - uses: n0-computer/actions-upload-release-asset@main if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') with: upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: ${{ env.ASSET }} - - # - uses: shogo82148/actions-upload-release-asset@v1 - # if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os == 'windows-latest' - # with: - # upload_url: ${{ needs.create-release.outputs.upload_url }} - # asset_path: iroh-${{ needs.create-release.outputs.release_version }}-${{ matrix.cargo_targets }}.zip - - # - uses: shogo82148/actions-upload-release-asset@v1 - # if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os == 'windows-latest' - # with: - # upload_url: ${{ needs.create-release.outputs.upload_url }} - # asset_path: iroh-relay-${{ needs.create-release.outputs.release_version }}-${{ matrix.cargo_targets }}.zip - - # - uses: shogo82148/actions-upload-release-asset@v1 - # if: (github.event.inputs.upload_artifacts == 'true' || github.event_name == 'push') && matrix.os == 'windows-latest' - # with: - # upload_url: ${{ needs.create-release.outputs.upload_url }} - # asset_path: iroh-dns-server-${{ needs.create-release.outputs.release_version }}-${{ matrix.cargo_targets }}.zip \ No newline at end of file