test publish workflow #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
name: Publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact_name: data2excel | |
asset_name: data2excel-linux-amd64 | |
command: apt install musl && apt install musl-dev && cargo build --release --target=x86_64-unknown-linux-musl | |
- os: windows-latest | |
artifact_name: data2excel.exe | |
asset_name: data2excel-windows-amd64.exe | |
command: cargo build --release | |
steps: | |
- name: Build | |
- uses: actions/checkout@v3 | |
run: ${{ matrix.command }} | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref }} |