Skip to content

feat(release): adding multi arch #54

feat(release): adding multi arch

feat(release): adding multi arch #54

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_v1
- 386
- arm64
- arm_7
os:
- linux
include:
- goarch: amd64_v1
haarch: amd64
- goarch: 386
haarch: i386
- goarch: arm64
haarch: aarch64
- goarch: arm_7
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
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GOS: ${{matrix.os}}
GARCH: ${{matrix.goarch}}
- name: copy binary to local ha folder
run: |
mkdir home-assistant/addons/sbam/bin/${{matrix.haarch}}
cp -v dist/sbam_linux_${{matrix.goarch}}/bin/sbam home-assistant/addons/sbam/bin/${{matrix.haarch}}
- 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
uses: home-assistant/[email protected]
with:
args: |
--${{matrix.haarch}} \
--target /data/home-assistant/addons/sbam/${{matrix.haarch}} \
--addon
release-os:
runs-on: ubuntu-latest
strategy:
matrix:
goarch:
- amd64_v1
- 386
- arm64
- arm_7
os:
- windows
- darwin
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:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GOS: ${{matrix.os}}
GARCH: ${{matrix.goarch}}