mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-06-26 04:31:49 +02:00
Updated github workflows, they should work now
This commit is contained in:
parent
ac6bf052d7
commit
c643219c30
86
.github/workflows/publish.yml
vendored
86
.github/workflows/publish.yml
vendored
@ -1,28 +1,18 @@
|
|||||||
name: Publish
|
name: Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
create:
|
||||||
branches: [ release ]
|
tags:
|
||||||
|
- 'v*' # Version tag
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
#- name: Publish crate
|
||||||
|
#run: cargo publish --manifest-path kalk/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
|
||||||
runs-on: ubuntu-latest
|
#- name: Publish CLI
|
||||||
|
#run: cargo publish --manifest-path kalk_cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
|
||||||
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
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: release ${{ matrix.target }}
|
name: release ${{ matrix.target }}
|
||||||
@ -32,8 +22,64 @@ jobs:
|
|||||||
target: [ubuntu-latest, macos-latest]
|
target: [ubuntu-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: Compile and release
|
- uses: Swatinem/rust-cache@v1.0.1
|
||||||
uses: PaddiM8/rust-build.action@master
|
- 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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
EXTRA_FILES: "README.md LICENSE"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user