Skip to content

fix release workflow #4 (please just work this time) #5

fix release workflow #4 (please just work this time)

fix release workflow #4 (please just work this time) #5

Workflow file for this run

name: Publish
on:
push:
tags:
- '*'
jobs:
build:
name: Release
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
matrix:
os: [ windows-x86_64, linux-x86_64 ]
include:
- os: linux-x86_64
target: x86_64-unknown-linux-gnu
artifact_name: universal-explorer
asset_name: universal-explorer_linux_x86_64
- os: windows-x86_64
target: x86_64-pc-windows-msvc
artifact_name: universal-explorer.exe
asset_name: universal-explorer_win_x86_64.exe
linker_package: gcc-mingw-w64-x86-64
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Install linker
if: matrix.linker_package != null
run: sudo apt-get install -y ${{ matrix.linker_package }}
- name: Install Rust target
run: rustup target add ${{ matrix.target }}
- name: Build project
run: cargo build --release --target ${{ matrix.target }}
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
overwrite: true
body: "Release for ${{ matrix.os }}"