From 36242c76b70fa7ad928ed45f56d059c75c59ba1b Mon Sep 17 00:00:00 2001 From: Kurenairisu Date: Mon, 26 Feb 2024 23:04:42 +0800 Subject: [PATCH] Revert "try 2" This reverts commit 0a6ad8e5ca376d0637916780862a1e81cb81dc13. --- .github/workflows/rust.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 453f462..bb84c3b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -87,22 +87,17 @@ jobs: draft: false prerelease: true - ## Debugging - - name: List target directory - run: ls -R target - - name: Download artifacts uses: actions/download-artifact@v2 with: path: artifacts - + - name: Upload artifacts to release - run: | - for artifact in artifacts/*; do - echo "Uploading $artifact" - curl \ - -H "Authorization: token ${{ secrets.PAT }}" \ - -H "Content-Type: $(file -b --mime-type $artifact)" \ - --data-binary @$artifact \ - "${{ steps.create_release.outputs.upload_url }}?name=$(basename $artifact)" - done \ No newline at end of file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./artifacts/${{ matrix.name }} + asset_name: ${{ matrix.name }} + asset_content_type: application/octet-stream \ No newline at end of file