Skip to content

Commit

Permalink
release v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac committed Apr 15, 2024
1 parent 08a3606 commit 4f20b26
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Release cli on github
on:
push:
branches:
- release-pipeline-ndc-test
tags:
- "v*"

jobs:
build-cli-binaries:
Expand Down Expand Up @@ -33,7 +29,7 @@ jobs:
shell: bash
steps:
- uses: actions/checkout@v4

ref: v0.1.2
- name: install protoc
uses: arduino/setup-protoc@v3
with:
Expand All @@ -57,21 +53,8 @@ jobs:

- name: build the CLI
run: |
# If we're on a tag, use the tag name as the release version.
if [[ "$GITHUB_REF_TYPE" == 'tag' ]]; then
# Ensure that the version specified in Cargo.toml is the same as the tag (with a 'v' prefix).
CARGO_VERSION="$(cargo metadata --format-version=1 | jq -r '.packages | .[] | select(.name == "ndc-test") | .version')"
echo "Git tag: ${GITHUB_REF_NAME}"
echo "Cargo version: ${CARGO_VERSION}"
if [[ "${GITHUB_REF_NAME}" != "v${CARGO_VERSION}" ]]; then
echo >&2 "The Git tag is \"${GITHUB_REF_NAME}\", but the version in Cargo.toml is \"${CARGO_VERSION}\"."
echo >&2 'These must be the same, with a "v" prefix for the tag. Aborting.'
exit 1
fi
export RELEASE_VERSION="$GITHUB_REF_NAME"
echo "RELEASE_VERSION = ${RELEASE_VERSION}"
fi
export RELEASE_VERSION="0.1.2"
echo "RELEASE_VERSION = ${RELEASE_VERSION}"
if [[ -n '${{ matrix.linker }}' ]]; then
TARGET_SCREAMING="$(echo '${{ matrix.target }}' | tr '[:lower:]' '[:upper:]' | tr '-' '_')"
Expand All @@ -97,7 +80,7 @@ jobs:
needs:
- build-cli-binaries
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
# if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v4

Expand All @@ -111,7 +94,7 @@ jobs:
set -evo pipefail
ROOT="$(pwd)"
export CLI_VERSION="$GITHUB_REF_NAME"
export CLI_VERSION="v0.1.2"
export LINUX_AMD64_SHA256=$(sha256sum ${ROOT}/release/artifacts/ndc-test-x86_64-unknown-linux-musl | cut -f1 -d' ')
export MACOS_AMD64_SHA256=$(sha256sum ${ROOT}/release/artifacts/ndc-test-x86_64-apple-darwin | cut -f1 -d' ')
Expand All @@ -122,7 +105,7 @@ jobs:
- name: Get version from tag
id: get-version
run: |
echo "tagged_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "tagged_version=0.1.2" >> $GITHUB_OUTPUT
shell: bash

- name: create a draft release
Expand Down

0 comments on commit 4f20b26

Please sign in to comment.