Skip to content

Commit bb6b4f7

Browse files
authored
Merge pull request #63 from ehuss/mdbook-spec-publish
Add a workflow to publish mdbook-spec
2 parents 13b05e7 + fbdd013 commit bb6b4f7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish mdbook-spec
2+
on:
3+
workflow_dispatch:
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
publish:
10+
name: Publish mdbook-spec
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: ./mdbook-spec
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Test
18+
run: cargo test
19+
- name: Publish
20+
env:
21+
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
22+
run: |
23+
version=`sed -n -E 's/^version = "(.*)"/\1/p' Cargo.toml`
24+
cargo publish --no-verify
25+
tag="mdbook-spec-${version}"
26+
git tag $tag
27+
git push origin "$tag"

0 commit comments

Comments
 (0)