diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2022-01-22 22:49:41 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2022-01-22 22:49:41 +0100 |
commit | 1bbffb81614fe5a600d796541f741a36391b20a9 (patch) | |
tree | 4cc6ea4599d3f84688df830170d9b6540f7dfbf5 /.github/workflows | |
parent | 0bbf9536fbf2921cb05283a032788e0a9cd9a300 (diff) | |
download | engarde-importer-1bbffb81614fe5a600d796541f741a36391b20a9.tar.gz engarde-importer-1bbffb81614fe5a600d796541f741a36391b20a9.tar.bz2 engarde-importer-1bbffb81614fe5a600d796541f741a36391b20a9.zip |
GitHub Workflow for releases
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/release.yml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..53339f5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,61 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + env: + GOARCH: amd64 + steps: + + - name: Set up Go 1.16 + uses: actions/setup-go@v2 + with: + go-version: 1.16 + id: go + + - name: Checkout + uses: actions/checkout@v2 + + - name: Get dependencies + run: go get -v -t -d ./... + + - name: Build (Windows) + run: go build -v ./... + env: + GOOS: windows + + - name: Build (Linux) + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Vet + run: go vet ./... + + - name: Release Build (Linux) + run: go build -ldflags '-s -w' -o bin/enguarde-importer + env: + GOOS: windows + + - name: Release Build (Windows) + run: go build -ldflags '-s -w -H=windowsgui' -o bin/enguarde-importer.exe + env: + GOOS: windows + + - name: Upload Release + uses: ColinPitrat/update-release@v1.0.1 + id: update-release + with: + token: ${{ secrets.GITHUB_TOKEN }} + files: bin/enguarde-importer bin/enguarde-importer.exe + + |