Skip to content

Commit

Permalink
Merge pull request #7 from VicDeo/improve-build
Browse files Browse the repository at this point in the history
Improve test flow and add build
  • Loading branch information
VicDeo authored Feb 9, 2024
2 parents c40c9a9 + f36beb9 commit 918b2b8
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
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 }}
11 changes: 5 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: "Run Tests"
on:
on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
workflow_dispatch:
workflow_call:
paths-ignore:
- 'README.md'




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

0 comments on commit 918b2b8

Please sign in to comment.