workflow try 5... tinyfile...

This commit is contained in:
WanderingPenwing 2024-07-22 16:50:26 +02:00
parent 013e293824
commit 0604673e8e

View file

@ -19,7 +19,10 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
target: [x86_64-pc-windows-gnu, x86_64-unknown-linux-musl] target:
# Temporarily disabling Windows compilation
# - x86_64-pc-windows-gnu
- x86_64-unknown-linux-musl
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -29,27 +32,26 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
- name: Install musl-gcc
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Install target - name: Install target
run: rustup target add ${{ matrix.target }} run: rustup target add ${{ matrix.target }}
- name: Install dependencies for tinyfiledialogs - name: Install dependencies for tinyfiledialogs
if: matrix.target == 'x86_64-unknown-linux-musl' if: matrix.target == 'x86_64-unknown-linux-musl'
run: | run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libglib2.0-dev sudo apt-get install -y libx11-dev libglib2.0-dev
- name: Compile the app - name: Compile the app
run: | run: cargo build --release --target ${{ matrix.target }}
cargo build --release --target ${{ matrix.target }}
- name: Create tarball - name: Create tarball
run: | run: |
release_tag=${{ github.event.release.tag_name }} release_tag=${{ github.event.release.tag_name }}
if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-musl" ]]; then tar -czvf calcifer_v${release_tag}.tar.gz -C target/${{ matrix.target }}/release calcifer
tar -czvf calcifer_v${release_tag}.tar.gz -C target/${{ matrix.target }}/release calcifer
elif [[ "${{ matrix.target }}" == "x86_64-pc-windows-gnu" ]]; then
tar -czvf calcifer_windows_v${release_tag}.tar.gz -C target/${{ matrix.target }}/release calcifer.exe
fi
- name: Upload release assets - name: Upload release assets
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
@ -57,10 +59,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ github.event.release.upload_url }} upload_url: ${{ github.event.release.upload_url }}
asset_path: | asset_path: calcifer_v${{ github.event.release.tag_name }}.tar.gz
calcifer_v${{ github.event.release.tag_name }}.tar.gz asset_name: calcifer_v${{ github.event.release.tag_name }}.tar.gz
calcifer_windows_v${{ github.event.release.tag_name }}.tar.gz
asset_name: |
calcifer_v${{ github.event.release.tag_name }}.tar.gz
calcifer_windows_v${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip asset_content_type: application/gzip