Skip to content

one-step flow submission, fuck you homeassistant #19

one-step flow submission, fuck you homeassistant

one-step flow submission, fuck you homeassistant #19

Workflow file for this run

name: Go
on:
push:
tags: ["v*"]
jobs:
build:
strategy:
matrix:
arch: [linux_amd64, linux_arm, windows_amd64, darwin_amd64, darwin_arm64]
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19.3
uses: actions/setup-go@v1
with:
go-version: 1.19.3
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: build
run: |
go get -v -t -d ./...
go generate ./...
arch=${{matrix.arch}}
export GOOS=${arch%%_*} GOARCH=${arch##*_} GOARM=5
go build -o ghastly.$arch -v --ldflags="-s" .
go build -o terraform-provider-homeassistant.$arch -v .
- name: upload-artifact ghastly
uses: actions/upload-artifact@v1
with:
name: ghastly.${{matrix.arch}}
path: ghastly.${{matrix.arch}}
- name: upload-artifact terraform-provider-homeassistant
uses: actions/upload-artifact@v1
with:
name: terraform-provider-homeassistant.${{matrix.arch}}
path: terraform-provider-homeassistant.${{matrix.arch}}
release:
name: Release
runs-on: ubuntu-latest
needs: build
steps:
- id: create_release
name: Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
assets:
name: Upload Assets
runs-on: ubuntu-latest
needs: release
strategy:
matrix:
arch: [linux_amd64, linux_arm, windows_amd64, darwin_amd64, darwin_arm64]
artifact: [ghastly,terraform-provider-homeassistant]
steps:
- name: download ${{matrix.artifact}}.${{matrix.arch}}
uses: actions/download-artifact@v1
with:
name: ${{matrix.artifact}}.${{matrix.arch}}
path: ./
- name: upload ${{matrix.artifact}}.${{matrix.arch}} to release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ${{matrix.artifact}}.${{matrix.arch}}
asset_name: ${{matrix.artifact}}.${{matrix.arch}}
asset_content_type: application/octet-stream