Skip to content

Commit

Permalink
build: Add github action to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
dvogt23 committed Nov 6, 2022
1 parent 8d42d0e commit 17960a8
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/cargo_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Cargo publish

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
publish:
if: startsWith(github.ref, 'refs/tags/v')
name: Publish Cargo Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo login $CARGO_LOGIN
- run: cargo publish
env:
CARGO_LOGIN: ${{ secrets.CARGO_LOGIN}}

22 changes: 22 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: [push, pull_request]

name: check

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[package]
name = "mdbook-yml-header"
version = "0.1.0"
authors = [
"Dmitrij Vogt <divogt@vogt.dev>"
]
authors = ["Vogt, Dimitrij <divogt@dima23.de>"]
documentation = "https://github.com/dvogt23/mdBook-yml-header/README.md"
edition = "2021"
keywords = ["book", "gitbook", "rustbook", "markdown", "preprocessor"]
Expand Down

0 comments on commit 17960a8

Please sign in to comment.