Skip to content

Commit

Permalink
fix output name
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Feb 19, 2024
1 parent f29df80 commit f0acab2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 36 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/build-tag.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Tagged Build

Expand All @@ -12,36 +10,37 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
-
name: Test
run: go test -v ./...
-
name: Build
run: bash ./build.sh
-
name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
-
name: Upload Release Assets
uses: zyxkad/upload-release-asset-dir@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_dir: ./output
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
cache-dependency-path: ./go.sum
-
name: Test
run: go test -v .
-
name: Build
run: bash ./build.sh
-
name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
-
name: Upload Release Assets
uses: zyxkad/upload-release-asset-dir@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_dir: ./output
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@

# tests
/test

/output
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

curdir="$(dirname $0)"

prefix="go-netcat"

available_platforms=(
darwin/amd64 darwin/arm64
linux/386 linux/amd64 linux/arm linux/arm64
Expand All @@ -21,7 +23,7 @@ export CGO_ENABLED=0
for p in "${available_platforms[@]}"; do
os=${p%/*}
arch=${p#*/}
target="${outputdir}/go-openbmclapi-${os}-${arch}"
target="${outputdir}/${prefix}-${os}-${arch}"
if [[ "$os" == "windows" ]]; then
target="${target}.exe"
fi
Expand Down

0 comments on commit f0acab2

Please sign in to comment.