mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-02-12 06:29:17 +01:00
Updated github workflows, they should work now
This commit is contained in:
parent
b6a745edbb
commit
a1d1526742
90
.github/workflows/publish.yml
vendored
90
.github/workflows/publish.yml
vendored
@ -1,28 +1,18 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ release ]
|
||||
create:
|
||||
tags:
|
||||
- 'v*' # Version tag
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1.0.1
|
||||
- name: Build
|
||||
run: cargo build --release --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
- 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
|
||||
#- 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 }}
|
||||
@ -32,8 +22,64 @@ jobs:
|
||||
target: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Compile and release
|
||||
uses: PaddiM8/rust-build.action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
EXTRA_FILES: "README.md LICENSE"
|
||||
- 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 }}
|
Loading…
Reference in New Issue
Block a user