Skip to content

Commit

Permalink
Fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasschafer committed Nov 30, 2024
1 parent cde73d4 commit 71239f4
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 71239f4

Please sign in to comment.