mirror of
https://github.com/Yvee1/hascard.git
synced 2024-09-11 07:15:36 +03:00
Fix small things
This commit is contained in:
parent
5c82df87dc
commit
8a258f913b
10
.github/scripts/attach-binary.sh
vendored
10
.github/scripts/attach-binary.sh
vendored
@ -5,14 +5,20 @@ then
|
||||
echo 'This is not a release build.'
|
||||
else
|
||||
echo "Attaching binary for $RUNNER_OS to $RELEASE_VERSION..."
|
||||
if [ "$RUNNER_OS" = "Linux" ]
|
||||
then
|
||||
ARCH="linux"
|
||||
else
|
||||
ARCH="osx"
|
||||
fi
|
||||
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-$RELEASE_VERSION-$RUNNER_OS.tar.gz"
|
||||
BUNDLE_NAME="$REPO-$RELEASE_VERSION-$ARCH.tar.gz"
|
||||
cp "$BIN" "./$REPO"
|
||||
chmod +x "./$REPO"
|
||||
tar -czf "$BUNDLE_NAME" "$REPO"
|
||||
echo "SHA256:"
|
||||
shasum -a 256 "$BUNDLE_NAME"
|
||||
ghr -t "${{ secrets.GITHUB_TOKEN }}" -u "$OWNER" -r "$REPO" --replace "$(git describe --tags)" "$BUNDLE_NAME"
|
||||
ghr -t "$GITHUB_TOKEN" -u "$OWNER" -r "$REPO" --replace "$(git describe --tags)" "$BUNDLE_NAME"
|
||||
fi
|
||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -32,4 +32,6 @@ jobs:
|
||||
- run: stack build
|
||||
- run: stack test
|
||||
- name: Attach binary to release, if this is a release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./.github/scripts/attach-binary.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
# hascard
|
||||
[![Build Status]()](https://github.com/Yvee1/hascard/actions/workflows/build.yml/badge.svg) [![GitHub tag](https://img.shields.io/github/tag/Yvee1/hascard.svg)](https://github.com/Yvee1/hascard/releases) [![AUR](https://img.shields.io/aur/version/hascard)](https://aur.archlinux.org/packages/hascard/) [![Hackage](https://img.shields.io/hackage/v/hascard.svg)](https://hackage.haskell.org/package/hascard)
|
||||
[![Build Status](https://github.com/Yvee1/hascard/actions/workflows/build.yml/badge.svg)](https://github.com/Yvee1/hascard/actions) [![GitHub tag](https://img.shields.io/github/tag/Yvee1/hascard.svg)](https://github.com/Yvee1/hascard/releases) [![AUR](https://img.shields.io/aur/version/hascard)](https://aur.archlinux.org/packages/hascard/) [![Hackage](https://img.shields.io/hackage/v/hascard.svg)](https://hackage.haskell.org/package/hascard)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user