Skip to content

Commit

Permalink
added the build binary?
Browse files Browse the repository at this point in the history
  • Loading branch information
Astrak00 committed Aug 2, 2024
1 parent bb1d07c commit b51a395
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,6 +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: Go-build-macos

on:
Expand All @@ -14,8 +11,6 @@ jobs:

strategy:
matrix:
# macos-12: amd64 (oldest supported version as of 05-02-2024)
# macos-14: arm64 (oldest arm64 version)
os: [macos-12, macos-14]
include:
- os: macos-12
Expand All @@ -32,16 +27,33 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
# You can test your matrix by printing the current Go version

- name: Display Go version
run: go version

- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...

#- name: Build
# run: go build -v main.go
- name: Build
run: go build -v -o my-binary-${{ matrix.os }}-${{ matrix.goarch }}


- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'v1.0.1'
release_name: Release v1.0.1
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./agdownloader-${{ matrix.os }}-${{ matrix.goarch }}
asset_name: agdownloader-${{ matrix.os }}-${{ matrix.goarch }}
asset_content_type: application/octet-stream

0 comments on commit b51a395

Please sign in to comment.