-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab14ccc
commit 2f46198
Showing
3 changed files
with
81 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,27 +11,56 @@ permissions: | |
id-token: write | ||
|
||
jobs: | ||
release: | ||
release-ha: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goarch: | ||
- amd64 | ||
- 386 | ||
- arm64 | ||
- arm | ||
goos: | ||
- linux | ||
include: | ||
- goarch: amd64 | ||
haarch: amd64 | ||
- goarch: 386 | ||
haarch: i386 | ||
- goarch: arm64 | ||
haarch: aarch64 | ||
- goarch: arm | ||
haarch: armv7 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
- name: Run GoReleaser | ||
|
||
- name: GoReleaser Install | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
install-only: true | ||
|
||
- name: GoReleaser Build | ||
run: | | ||
mkdir -p home-assistant/addons/sbam/bin/${{matrix.haarch}} | ||
goreleaser build --clean --single-target --id sbam --output home-assistant/addons/sbam/bin/${{matrix.haarch}} | ||
env: | ||
GOOS: ${{matrix.goos}} | ||
GOARCH: ${{matrix.goarch}} | ||
GOARM: 7 | ||
CGO_ENABLED: 0 | ||
|
||
- name: GoReleaser Publish | ||
run: goreleaser publish | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: copy binary to local ha folder | ||
run: | | ||
mkdir home-assistant/addons/sbam/bin/ | ||
cp -v dist/sbam_linux_amd64_v1/bin/sbam home-assistant/addons/sbam/bin/ | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -42,6 +71,40 @@ jobs: | |
uses: home-assistant/[email protected] | ||
with: | ||
args: | | ||
--amd64 \ | ||
--target /data/home-assistant/addons/sbam \ | ||
--addon | ||
--${{matrix.haarch}} \ | ||
--target /data/home-assistant/addons/sbam/${{matrix.haarch}} \ | ||
--addon | ||
release-os: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goarch: | ||
- amd64 | ||
- 386 | ||
- arm64 | ||
- arm | ||
goos: | ||
- windows | ||
- darwin | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
|
||
- name: GoReleaser Build | ||
run: goreleaser build --clean --single-target --id sbam | ||
env: | ||
GOOS: ${{matrix.goos}} | ||
GOARCH: ${{matrix.goarch}} | ||
GOARM: 7 | ||
CGO_ENABLED: 0 | ||
|
||
- name: GoReleaser Publish | ||
run: goreleaser publish | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters