Publish from GitHub master branch instead of local master (#1032)
This commit is contained in:
parent
1841eb16c6
commit
e84dc0ff8f
20
justfile
20
justfile
@ -61,15 +61,19 @@ check: actionlint fmt clippy test forbid
|
|||||||
cargo ltest
|
cargo ltest
|
||||||
git checkout Cargo.lock
|
git checkout Cargo.lock
|
||||||
|
|
||||||
publish-check: check man
|
# publish current GitHub master branch
|
||||||
cargo outdated --root-deps-only --exit-code 1
|
publish:
|
||||||
|
#!/usr/bin/env bash
|
||||||
# publish to crates.io and push release tag to github
|
set -euxo pipefail
|
||||||
publish: publish-check
|
rm -rf tmp/release
|
||||||
git branch | grep '* master'
|
git clone git@github.com:casey/just.git tmp/release
|
||||||
git tag -a {{version}} -m 'Release {{version}}'
|
VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
|
||||||
git push github {{version}}
|
cd tmp/release
|
||||||
|
git tag -a $VERSION -m "Release $VERSION"
|
||||||
|
git push github $VERSION
|
||||||
cargo publish
|
cargo publish
|
||||||
|
cd ../..
|
||||||
|
rm -rf tmp/release
|
||||||
|
|
||||||
push: check
|
push: check
|
||||||
! git branch | grep '* master'
|
! git branch | grep '* master'
|
||||||
|
Loading…
Reference in New Issue
Block a user