Skip to content

Commit

Permalink
Add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed Feb 9, 2024
1 parent 4c4ef62 commit f36beb9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Buid executable"

on:
workflow_dispatch:

jobs:
call-workflow-passing-data:
- uses: VicDeo/go-obfuscate/.github/workflows/test.yml@master

build:
env:
APP_NAME="go-obfuscate"
GO_ARCH="amd64"
strategy:
matrix:
include:
- os: ubuntu-latest
GOOS: linux
artifact: go-obfuscate.linux.amd64
- os: windows-latest
GOOS: windows
artifact: go-obfuscate.exe
- os: macos-latest
GOOS: darwin
artifact: go-obfuscate.macos.amd64

runs-on: ${{ matrix.os }}

- name: Build for ${{ matrix.os }}
run: GOOS={{ matrix.GOOS }} GOARCH=$GO_ARCH go build -o {{ matrix.artifact }}

- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: go-obfuscate-artifacts
path: |
{{ matrix.artifact }}
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ on:
push:
pull_request:
workflow_dispatch:
workflow_call:
paths-ignore:
- 'README.md'




jobs:
test:
runs-on: ubuntu-latest
Expand Down

0 comments on commit f36beb9

Please sign in to comment.