diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9f5c1d8 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d55cf87..61deb2c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,9 +3,12 @@ on: push: pull_request: workflow_dispatch: + workflow_call: paths-ignore: - 'README.md' - + + + jobs: test: runs-on: ubuntu-latest