mirror of
https://github.com/Yvee1/hascard.git
synced 2024-11-22 04:33:06 +03:00
Fix release version in Github Actions
This commit is contained in:
parent
24d4e10a58
commit
41a33916e6
6
.github/scripts/attach-binary.sh
vendored
6
.github/scripts/attach-binary.sh
vendored
@ -1,14 +1,14 @@
|
||||
set -o errexit -o verbose
|
||||
|
||||
if test ! "$GITHUB_REF"
|
||||
if test ! "$RELEASE_VERSION"
|
||||
then
|
||||
echo 'This is not a release build.'
|
||||
else
|
||||
echo "Attaching binary for $RUNNER_OS to $GITHUB_REF..."
|
||||
echo "Attaching binary for $RUNNER_OS to $RELEASE_VERSION..."
|
||||
OWNER="$(echo "$GITHUB_REPOSITORY" | cut -f1 -d/)"
|
||||
REPO="$(echo "$GITHUB_REPOSITORY" | cut -f2 -d/)"
|
||||
BIN="$(stack path --local-install-root)/bin/$REPO"
|
||||
BUNDLE_NAME="$REPO-$GITHUB_REF-$RUNNER_OS.tar.gz"
|
||||
BUNDLE_NAME="$REPO-$RELEASE_VERSION-$RUNNER_OS.tar.gz"
|
||||
cp "$BIN" "./$REPO"
|
||||
chmod +x "./$REPO"
|
||||
tar -czf "$BUNDLE_NAME" "$REPO"
|
||||
|
2
.github/scripts/install-ghr.sh
vendored
2
.github/scripts/install-ghr.sh
vendored
@ -1,6 +1,6 @@
|
||||
set -o errexit -o verbose
|
||||
|
||||
if test ! "$GITHUB_REF"
|
||||
if test ! "$RELEASE_VERSION"
|
||||
then
|
||||
echo 'This is not a release build.'
|
||||
else
|
||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -6,6 +6,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Set tag environment
|
||||
run: if [[ "$GITHUB_REF" == refs/tags/* ]]; then echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV; else echo "not a release build"; fi
|
||||
- name: Install ghr
|
||||
run: ./.github/scripts/install-ghr.sh
|
||||
- name: Install stack
|
||||
|
Loading…
Reference in New Issue
Block a user