Create publish.yml

This commit is contained in:
PaddiM8 2020-12-09 16:50:58 +01:00 committed by GitHub
parent d598431e2d
commit d4a0e8171b

40
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Publish
on:
push:
branches: [ release ]
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
release_ubuntu:
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: Release ${{ github.ref }}
draft: false
prerelease: false