Skip to content

Commit

Permalink
NOISSUE - Create workflow for building on release (#51)
Browse files Browse the repository at this point in the history
* create workflow for building on release

Signed-off-by: mteodor <[email protected]>

* create workflow for building on release

Signed-off-by: mteodor <[email protected]>

* fix asset name

Signed-off-by: mteodor <[email protected]>

---------

Signed-off-by: mteodor <[email protected]>
  • Loading branch information
mteodor authored May 24, 2023
1 parent b033230 commit 08b56ed
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Automated release
on:
release:
types: [published]

jobs:
release-linux-windows:
name: release linux-windows
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v2
- name: compile and release
uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
asset_name: mainflux-agent-${{ github.event.release.tag_name }}-${{ matrix.goos }}-${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.15.15.linux-amd64.tar.gz"
binary_name: "mainflux-agent"
build_command: "make"
env:
BUILD_DIR: "."
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0

BUILD_DIR = build
BUILD_DIR ?= build
SERVICES = agent
DOCKERS = $(addprefix docker_,$(SERVICES))
DOCKERS_DEV = $(addprefix docker_dev_,$(SERVICES))
Expand Down

0 comments on commit 08b56ed

Please sign in to comment.