mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-12 17:40:52 +01:00
85 lines
2.2 KiB
YAML
85 lines
2.2 KiB
YAML
name: Publish
|
|
|
|
on:
|
|
create:
|
|
tags:
|
|
- 'v*' # Version tag
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
#- name: Publish crate
|
|
#run: cargo publish --manifest-path kalk/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
|
|
#- name: Publish CLI
|
|
#run: cargo publish --manifest-path kalk_cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
|
|
|
|
release:
|
|
name: release ${{ matrix.target }}
|
|
runs-on: ${{ matrix.target }}
|
|
strategy:
|
|
matrix:
|
|
target: [ubuntu-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: Swatinem/rust-cache@v1.0.1
|
|
- name: Compile
|
|
run: |
|
|
cargo build --release --verbose
|
|
cp target/release/kalk target/release/kalk-${{ runner.os }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: binaries
|
|
path: target/release/kalk-${{ runner.os }}
|
|
|
|
release_windows:
|
|
name: release windows
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
update: true
|
|
install: >-
|
|
base-devel
|
|
pacman-mirrors
|
|
diffutils
|
|
m4
|
|
make
|
|
mingw-w64-x86_64-gcc
|
|
mingw-w64-x86_64-rust
|
|
|
|
- shell: msys2 {0}
|
|
run: |
|
|
cargo build --release --verbose
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: binaries
|
|
path: target/release/kalk.exe
|
|
|
|
create_release:
|
|
name: Create Release
|
|
needs: [release, release_windows]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: ${{ github.ref }}
|
|
draft: false
|
|
prerelease: false
|
|
- name: Download Artifact
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: binaries
|
|
- name: Upload Linux Assets
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: ./*
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |