From 12434469b9219b5a441e47191c4ab2145fe4cc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 22 Apr 2023 00:52:23 +0300 Subject: [PATCH] github: Add a separate manual workflow for uploading artifacts to a release --- .github/workflows/upload-artifacts.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/upload-artifacts.yml diff --git a/.github/workflows/upload-artifacts.yml b/.github/workflows/upload-artifacts.yml new file mode 100644 index 0000000..04190e5 --- /dev/null +++ b/.github/workflows/upload-artifacts.yml @@ -0,0 +1,36 @@ +name: Upload artifacts +on: + workflow_dispatch: + inputs: + commit: + description: 'Commit to extract from' + required: true + type: string + tag: + description: 'Tag to upload to' + required: true + type: string + +permissions: + contents: read + +jobs: + upload-release: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build.yml + workflow_conclusion: success + commit: ${{inputs.commit}} + - name: Rearrange files + run: | + mv windows-*-toolchain/*.zip linux-toolchain/*.tar.xz macos-toolchain/*.tar.xz . + - name: Upload binaries + env: + GITHUB_TOKEN: ${{github.token}} + run: | + gh release upload ${{inputs.tag}} *.tar.xz *.zip --clobber -R ${{github.repository}}