Skip to content

chore: Release site version 0.8.0 #11

chore: Release site version 0.8.0

chore: Release site version 0.8.0 #11

Workflow file for this run

name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
env:
BIN_NAME: site
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macOS-latest
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: rustup update stable
- run: rustup target add ${{ matrix.target }}
- run: cargo build --release --target ${{ matrix.target }}
- run: cargo test --release --target ${{ matrix.target }}
- name: Package
if: matrix.os != 'windows-latest'
run: |
strip target/${{ matrix.target }}/release/${{ env.BIN_NAME }}
cd target/${{ matrix.target }}/release
tar czvf ../../../${{ env.BIN_NAME }}-${{ matrix.target }}.tar.gz ${{ env.BIN_NAME }}
cd -
- name: Package (windows)
if: matrix.os == 'windows-latest'
run: |
strip target/${{ matrix.target }}/release/${{ env.BIN_NAME }}.exe
cd target/${{ matrix.target }}/release
7z a ../../../${{ env.BIN_NAME }}-${{ matrix.target }}.zip ${{ env.BIN_NAME }}.exe
cd -
- name: Release
uses: softprops/action-gh-release@v2
with:
files: '${{ env.BIN_NAME }}-${{ matrix.target }}*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}