Skip to content

update ci

update ci #31

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
tags:
- v*
pull_request:
branches: [ main ]
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux-x64
exe: pallas
- os: windows-latest
name: windows-x64
exe: pallas.exe
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Compile
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: target/release/${{ matrix.exe }}
release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Linux x64
uses: actions/download-artifact@v4
with:
name: linux-x64
path: release
- name: Zip Linux x64
run: |
cd release && zip linux-x64.zip pallas
- name: Rename Linux x64
run: |
cd release && mv pallas linux-x64
- name: Download Windows x64
uses: actions/download-artifact@v4
with:
name: windows-x64
path: release
- name: Zip Windows x64
run: |
cd release && zip windows-x64.zip pallas.exe && rm pallas.exe
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
release/*
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}