-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
280: Add a new Github workflow step to release r=alallema a=brunoocasali Since the adoption of this new release system *(now we need to update the version of the constant defined in the version.go file). We now need to validate that we are following this step. Related to #279 Co-authored-by: Bruno Casali <brunoocasali@gmail.com> Co-authored-by: Amélie <alallema@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
# Checking if current tag matches the package version | ||
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/') | ||
file1='version.go' | ||
file_tag1=$(grep 'const VERSION' -A 0 $file1 | cut -d '=' -f2 | tr -d '"' | tr -d ' ') | ||
|
||
if [ "$current_tag" != "$file_tag1" ]; then | ||
echo "Error: the current tag does not match the version in package file(s)." | ||
echo "$file1: found $file_tag1 - expected $current_tag" | ||
exit 1 | ||
fi | ||
|
||
echo 'OK' | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Validate release version | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
publish: | ||
name: Validate release version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check release validity | ||
run: sh .github/scripts/check-release.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters