Skip to content

Commit

Permalink
feature: publish artifacts on github
Browse files Browse the repository at this point in the history
Closes #1

* try to do a release using workflows

* update workflows version

* hardcode version and figure out where we are

* attach workspace

also, gather more info about where we are

* attach workspace somewhere else

* persist to workspace

* use correct what-bump path from workspace

* set tag in command line

* mock version number

what-bump outputs "what-bump x.y.z" when asked to print it's version number, whereas ghr expects just the version number.

* change version to an easily greppable value

* chore: release version 0.2.0

* quit on error

* few more touches to CI script

* indent things properly

* do a checkout so we have tags available, hopefully

* removed all cruft from cicrcleci file

Moved release code into a shell script to be run locally by an owner.

* remove more cruft
  • Loading branch information
albx79 authored Dec 23, 2019
1 parent 8eafa2e commit 1ea274e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
command: cargo generate-lockfile
- restore_cache:
keys:
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- &cacheKey v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Build all targets
name: Build what-bump
command: cargo build --release
- run:
name: Run all tests
command: cargo test --all
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Run all tests
command: cargo test --all
key: *cacheKey
- store_artifacts:
path: target/x86_64-unknown-linux-musl/release/what-bump
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["albx79 <otrebla79>"]
edition = "2018"
name = "what-bump"
version = "0.2.0"
version = "0.0.0-UNRELEASED"
license = "BSD-3-Clause"
description = "Detect required version bump based on conventional commit messages"

Expand Down
10 changes: 10 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env sh
set -e
LATEST_VERSION=$(git tag | grep -E '[0-9]+.[0-9]+.[0-9]+.*' | sort -rV | head -1)
NEW_VERSION=$(what-bump --from "$LATEST_VERSION" "$LATEST_VERSION")
sed -i "s/0.0.0-UNRELEASED/$NEW_VERSION/g" Cargo.toml
git commit -a -m "chore: release version $NEW_VERSION"
git tag -a "$NEW_VERSION" -m "Release $NEW_VERSION"
git checkout master
git merge "$NEW_VERSION"
git push origin master "$NEW_VERSION"

0 comments on commit 1ea274e

Please sign in to comment.