Skip to content

feat(release): adding multi arch #59

feat(release): adding multi arch

feat(release): adding multi arch #59

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
permissions:
contents: write
packages: write
id-token: write
jobs:
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: GoReleaser Install
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
- name: GoReleaser Build ${{matrix.goos}}, ${{matrix.goarch}}
run: |
mkdir home-assistant/addons/sbam/bin
goreleaser build --clean --single-target --output home-assistant/addons/sbam/bin/sbam
env:
GOOS: ${{matrix.goos}}
GOARCH: ${{matrix.goarch}}
GOARM: 7
CGO_ENABLED: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish build - Home Assistant builder ${{matrix.goos }}, $${{matrix.haarch}}
uses: home-assistant/[email protected]
with:
args: |
--${{matrix.haarch}} \
--target /data/home-assistant/addons/sbam \
--addon
release-os:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}