add support for windows releases #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'app-pipeline' | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.18.x] | |
platform: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/checkout@v1 | |
- name: Cache go dependencies | |
id: unit-cache-go-dependencies | |
uses: actions/cache@v1 | |
with: | |
path: | | |
~/go/pkg/mod | |
.tmp/ | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
- name: Install go dependencies | |
if: steps.unit-cache-go-dependencies.outputs.cache-hit != 'true' | |
run: make bootstrap | |
- name: Run Static Analyses | |
run: make lint | |
- name: Run Tests | |
run: make test | |
build-artifacts: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: '1.18.x' | |
- uses: actions/checkout@v1 | |
- name: Cache go dependencies | |
id: package-cache-go-dependencies | |
uses: actions/cache@v1 | |
with: | |
path: | | |
~/go/pkg/mod | |
.tmp/ | |
key: ${{ runner.os }}-go-prod-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-prod- | |
- name: Install dependencies | |
if: steps.package-cache-go-dependencies.outputs.cache-hit != 'true' | |
run: make bootstrap | |
- name: Build snapshot artifacts | |
run: make ci-build-snapshot-packages | |
- uses: actions/upload-artifact@master | |
with: | |
name: artifacts | |
path: dist | |
test-linux-artifacts: | |
needs: [ build-artifacts ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/download-artifact@master | |
with: | |
name: artifacts | |
path: dist | |
- name: Test linux run | |
run: make ci-test-linux-run | |
- name: Test docker run | |
run: make ci-plugs-out-test | |
test-mac-artifacts: | |
needs: [ build-artifacts ] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/download-artifact@master | |
with: | |
name: artifacts | |
path: dist | |
- name: Test darwin run | |
run: make ci-test-mac-run | |
test-windows-artifacts: | |
needs: [ build-artifacts ] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/download-artifact@master | |
with: | |
name: artifacts | |
path: dist | |
- name: Test windows run | |
run: make ci-test-windows-run | |
release: | |
needs: [ test, build-artifacts, test-linux-artifacts, test-mac-artifacts, test-windows-artifacts ] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: '1.18.x' | |
- uses: actions/checkout@v1 | |
- name: Cache go dependencies | |
id: release-cache-go-dependencies | |
uses: actions/cache@v1 | |
with: | |
path: | | |
~/go/pkg/mod | |
.tmp/ | |
key: ${{ runner.os }}-go-prod-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-prod- | |
- name: Install dependencies | |
if: steps.release-cache-go-dependencies.outputs.cache-hit != 'true' | |
run: make bootstrap | |
- name: Publish GitHub release | |
run: make ci-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |