Skip to content

ci: sets workflow timeout. #411

ci: sets workflow timeout.

ci: sets workflow timeout. #411

Workflow file for this run

name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.19.0'
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'temurin'
- name: Install dependencies
run: go mod download
- name: Test
run: go test -v ./...
- name: Build
run: go build
- name: Dry run
uses: goreleaser/goreleaser-action@v2
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with:
version: latest
args: release --snapshot
- name: Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}