Skip to content

export as lib file sometimes #158

export as lib file sometimes

export as lib file sometimes #158

Workflow file for this run

name: Rust
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Monthly
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-2019]
rust: [stable, beta]
configuration: [release]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
filename: gchimp
label: Ubuntu
- os: windows-2019
filename: gchimp.exe
target: x86_64-pc-windows-msvc
label: Windows
- configuration: release
release-flag: '--release'
name: ${{ matrix.rust }} - ${{ matrix.label }} - ${{ matrix.configuration }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- if: job.container
run: chown -R $(id -u):$(id -g) .
- name: Install Rust
uses: actions-rs/[email protected]
with:
profile: minimal
override: true
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- uses: Swatinem/[email protected]
- name: Build
uses: actions-rs/[email protected]
with:
command: build
args: --target ${{ matrix.target }} ${{ matrix.release-flag }}
- name: Preparing upload
run: |
mkdir gchimp
cp target/${{ matrix.target }}/${{ matrix.configuration }}/${{ matrix.filename }} gchimp/${{ matrix.filename }}
cp -r dist gchimp/
mv gchimp/dist/config.toml gchimp/config.toml
- uses: actions/[email protected]
if: matrix.rust == 'stable'
with:
name: gchimp-${{ runner.os }}
path: gchimp
- name: Prepare Release
if: startsWith(github.ref, 'refs/tags/') && matrix.rust == 'stable' && matrix.configuration == 'release' && !matrix.cross
run: |
7z a gchimp-${{ runner.os }}.7z gchimp
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && matrix.rust == 'stable' && matrix.configuration == 'release' && !matrix.cross
with:
files: gchimp-${{ runner.os }}.7z