From d2f0c0a19eb9ccc0e3b154ed91b0f059d9512ce7 Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Mon, 23 Sep 2024 20:46:44 -0400 Subject: [PATCH] Fix binary uploads --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 205cf41..55ff7d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,8 +45,8 @@ jobs: - run: cargo build --release --target ${{ matrix.rust-target }} - uses: actions/upload-artifact@v4 with: - name: adroit-${{ matrix.target }} - path: target/${{ matrix.target }}/release/adroit${{ matrix.ext }} + name: adroit-${{ matrix.rust-target }} + path: target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} - run: npm ci - run: mkdir packages/adroit-vscode/bin - run: cp target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} packages/adroit-vscode/bin/adroit${{ matrix.ext }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04d9016..39d5b5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,9 +36,14 @@ jobs: - run: ${{ matrix.install-script }} - run: rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} - - uses: softprops/action-gh-release@v2 + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - files: target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} + upload_url: ${{ github.event.release.upload_url }} + asset_path: target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} + asset_name: adroit-${{ matrix.rust-target }}${{ matrix.ext }} + asset_content_type: application/octet-stream - run: npm ci - run: mkdir packages/adroit-vscode/bin - run: cp target/${{ matrix.rust-target }}/release/adroit${{ matrix.ext }} packages/adroit-vscode/bin/adroit${{ matrix.ext }}