diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index 3b7460d..eb1e2ff 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -40,6 +40,8 @@ jobs: name: CHANGELOG.md path: ./CHANGELOG.md +### + build-linux-arm64: runs-on: ubuntu-24.04 steps: @@ -171,6 +173,90 @@ jobs: name: apc-p15-install-windows-amd64 path: ./apc-p15-install.exe + build-darwin-arm64: + runs-on: macos-15 + steps: + - name: Checkout Backend Repo + uses: actions/checkout@v4 + with: + repository: gregtwallace/apc-p15-tool + ref: ${{ env.GITHUB_REF }} + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '${{ env.GO_VERSION }}' + + - name: Build Tool + run: go build -o ./apc-p15-tool -v ./cmd/tool + env: + GOOS: darwin + GOARCH: arm64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool-darwin-arm64 + path: ./apc-p15-tool + + - name: Build Install Only + run: go build -o ./apc-p15-install -v ./cmd/install_only + env: + GOOS: darwin + GOARCH: arm64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-install-darwin-arm64 + path: ./apc-p15-install + + build-darwin-amd64: + runs-on: macos-13 + steps: + - name: Checkout Backend Repo + uses: actions/checkout@v4 + with: + repository: gregtwallace/apc-p15-tool + ref: ${{ env.GITHUB_REF }} + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '${{ env.GO_VERSION }}' + + - name: Build Tool + run: go build -o ./apc-p15-tool -v ./cmd/tool + env: + GOOS: darwin + GOARCH: amd64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool-darwin-amd64 + path: ./apc-p15-tool + + - name: Build Install Only + run: go build -o ./apc-p15-install -v ./cmd/install_only + env: + GOOS: darwin + GOARCH: amd64 + CGO_ENABLED: 0 + + - name: Save Compiled Binary + uses: actions/upload-artifact@v4 + with: + name: apc-p15-install-darwin-amd64 + path: ./apc-p15-install + +### + release-file-linux-arm64: needs: [build-common, build-linux-arm64] runs-on: ubuntu-24.04 @@ -302,3 +388,91 @@ jobs: with: name: apc-p15-tool_windows_amd64 path: ./release + + release-file-darwin-arm64: + needs: [build-common, build-darwin-arm64] + runs-on: ubuntu-24.04 + + steps: + - name: Make release directory + run: mkdir ./release + + - name: Download Tool Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-tool-darwin-arm64 + path: ./release + + - name: Download Install Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-install-darwin-arm64 + path: ./release + + - name: Download README + uses: actions/download-artifact@v4 + with: + name: README.md + path: ./release + + - name: Download LICENSE + uses: actions/download-artifact@v4 + with: + name: LICENSE.md + path: ./release + + - name: Download CHANGELOG + uses: actions/download-artifact@v4 + with: + name: CHANGELOG.md + path: ./release + + - name: Save Release + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool_darwin_arm64 + path: ./release + + release-file-darwin-amd64: + needs: [build-common, build-darwin-amd64] + runs-on: ubuntu-24.04 + + steps: + - name: Make release directory + run: mkdir ./release + + - name: Download Tool Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-tool-darwin-amd64 + path: ./release + + - name: Download Install Binary + uses: actions/download-artifact@v4 + with: + name: apc-p15-install-darwin-amd64 + path: ./release + + - name: Download README + uses: actions/download-artifact@v4 + with: + name: README.md + path: ./release + + - name: Download LICENSE + uses: actions/download-artifact@v4 + with: + name: LICENSE.md + path: ./release + + - name: Download CHANGELOG + uses: actions/download-artifact@v4 + with: + name: CHANGELOG.md + path: ./release + + - name: Save Release + uses: actions/upload-artifact@v4 + with: + name: apc-p15-tool_darwin_amd64 + path: ./release diff --git a/build.ps1 b/build.ps1 index 7147a33..0c8774b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -34,3 +34,25 @@ $env:GOARCH = "arm64" $env:GOOS = "linux" $env:CGO_ENABLED = 0 go build -o $outDir/apc-p15-install-arm64 ./cmd/install_only + +# Darwin (MacOS) amd64 +$env:GOARCH = "amd64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-tool-darwin-amd64 ./cmd/tool + +$env:GOARCH = "amd64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-install-darwin-amd64 ./cmd/install_only + +# Darwin (MacOS) arm64 +$env:GOARCH = "arm64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-tool-darwin-arm64 ./cmd/tool + +$env:GOARCH = "arm64" +$env:GOOS = "darwin" +$env:CGO_ENABLED = 0 +go build -o $outDir/apc-p15-install-darwin-arm64 ./cmd/install_only