Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy - use tag as version #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ jobs:
with:
toolchain: stable

- name: get sd
uses: robinraju/[email protected]
with:
repository: "chmln/sd"
tag: "v0.7.6"
fileName: "sd-v0.7.6-x86_64-unknown-linux-musl"

run: |
mkdir -pv ${GITHUB_WORKSPACE}/bin
mv -v sd-v0.7.6-x86_64-unknown-linux-musl ${GITHUB_WORKSPACE}/bin/sd
echo "::add-path::${GITHUB_WORKSPACE}/bin"
chmod +x "${GITHUB_WORKSPACE}/bin/sd"

- name: set version to tag version
uses: actions-rs/cargo@v1
with:
command: run
args: --release -- version set $(git tag --contains HEAD --format='%(refname)' | sd '^refs/tags/v([0-9]+\.[0-9]+\.[0-9]+(?:-[A-Za-z0-9]+(?:\.[0-9]+)?)?)$' '$1' )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unleash already has git2 in its dependency tree and uses that. arguably, version set --git-tag might be something we want to support native..


- name: Deploy by self
uses: actions-rs/cargo@v1

Expand Down
26 changes: 13 additions & 13 deletions 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
@@ -1,6 +1,6 @@
[package]
name = "cargo-unleash"
version = "1.0.0-alpha.dev"
version = "1.0.0-alpha.14"
authors = ["Benjamin Kampmann <[email protected]>"]
edition = "2021"
rust-version = "1.56.1"
Expand Down