Skip to content

fix release action

fix release action #7

Workflow file for this run

on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
name: build ${{ matrix.platform }} ${{ matrix.target }}
strategy:
matrix:
include:
- platform: windows-latest
target: x86_64-pc-windows-msvc
output: extern_traces_viewer.exe
- platform: macos-latest
target: aarch64-apple-darwin
output: extern_traces_viewer
- platform: ubuntu-latest
target: x86_64-unknown-linux-gnu
output: extern_traces_viewer
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: cargo build --target ${{ matrix.target }} --release
- name: save artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}-${{ matrix.target }}
path: target/${{ matrix.target }}/release/${{ matrix.output }}
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
- run: |
mkdir release
mv build-macos-latest-aarch64-apple-darwin/extern_traces_viewer ./release/extern_traces_viewer.osx_arm64
mv build-ubuntu-latest-x86_64-unknown-linux-gnu/extern_traces_viewer ./release/extern_traces_viewer.linux_amd64
mv build-windows-latest-x86_64-pc-windows-msvc/extern_traces_viewer.exe ./release/extern_traces.amd64.exe
- name: release
uses: softprops/action-gh-release@v2
with:
files: release/*