From f0e5320891410123ea4b6c1ef17e20705684eb46 Mon Sep 17 00:00:00 2001 From: Alex Brown Date: Sun, 4 Feb 2024 11:46:45 -0500 Subject: [PATCH] Fix for build process --- .github/workflows/go.yml | 14 -------------- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fa6a67a..bfd2fac 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,7 +10,6 @@ on: branches: [ "main" ] jobs: - build: runs-on: ubuntu-latest steps: @@ -29,16 +28,3 @@ jobs: - name: Build Raspberry Pi run: env GOOS=linux GOARCH=arm GOARM=5 go build -v -o ./family-dashboard-pi . - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: | - Changes in this Release - draft: true - prerelease: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a59a180 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +# .github/workflows/release.yaml + +on: + release: + types: [created] + +permissions: + contents: write + packages: write + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, darwin] + goarch: [amd64, arm64] + steps: + - uses: actions/checkout@v4 + - uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + project_path: "./family-dashboard" + binary_name: "family-dashboard" + extra_files: LICENSE README.md \ No newline at end of file