From 71239f471a01b9f5d5b9e97d1a39a71140f673bf Mon Sep 17 00:00:00 2001 From: thomasschafer Date: Sat, 30 Nov 2024 16:50:47 +0000 Subject: [PATCH] Fix release workflow --- .github/workflows/release.yml | 42 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2672ebe..1222c42 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,9 @@ name: Release on: push: + # branches: [ "main" ] + # TODO: remove the below and uncomment various lines again + pull_request: branches: [ "main" ] paths: - 'Cargo.toml' @@ -60,25 +63,25 @@ jobs: build-and-upload: needs: prepare-release - if: needs.prepare-release.outputs.should_release == 'true' + # if: needs.prepare-release.outputs.should_release == 'true' name: ${{ matrix.target }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - - os: ubuntu-latest - target: x86_64-unknown-linux-musl - use-cross: true - - os: ubuntu-latest - target: aarch64-unknown-linux-musl - use-cross: true - - os: macos-13 - target: x86_64-apple-darwin - use-cross: false - - os: macos-latest - target: aarch64-apple-darwin - use-cross: false + # - os: ubuntu-latest + # target: x86_64-unknown-linux-musl + # use-cross: true + # - os: ubuntu-latest + # target: aarch64-unknown-linux-musl + # use-cross: true + # - os: macos-13 + # target: x86_64-apple-darwin + # use-cross: false + # - os: macos-latest + # target: aarch64-apple-darwin + # use-cross: false - os: windows-latest target: x86_64-pc-windows-msvc use-cross: false @@ -148,15 +151,14 @@ jobs: esac - name: Upload to release - uses: softprops/action-gh-release@v1 - with: - tag_name: v${{ needs.prepare-release.outputs.version }} - files: | - target/${{ matrix.target }}/release/${{ env.ASSET }} - target/${{ matrix.target }}/release/${{ env.ASSET }}.sha256 - target/${{ matrix.target }}/release/${{ env.ASSET }}.sha512 + shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + run: | + for file in target/${{ matrix.target }}/release/${{ env.ASSET }}*; do + gh release upload "v${{ needs.prepare-release.outputs.version }}" "$file" --clobber + done publish: needs: [prepare-release, build-and-upload]