mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
Merge pull request #173 from foomo/feature/update-workflows
chore: add release workflow
This commit is contained in:
commit
ad6df3c12a
34
.github/workflows/pull-requests.yml
vendored
34
.github/workflows/pull-requests.yml
vendored
@ -9,48 +9,36 @@ on:
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
jobs:
|
||||
matrix:
|
||||
name: Matrix
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
gomod: ${{ steps.gomod.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- id: gomod
|
||||
run: |
|
||||
matrix=$(find . -type f -name "go.mod" -print0 | xargs -0 -n1 dirname | sort --unique | jq -R -s -c 'split("\n")[:-1]')
|
||||
echo "${matrix}"
|
||||
echo "::set-output name=matrix::${matrix}"
|
||||
check:
|
||||
name: Check
|
||||
needs: matrix
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
gomod: ${{ fromJson(needs.matrix.outputs.gomod) }}
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
GOPROXY: https://proxy.golang.org
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
cache: true
|
||||
check-latest: true
|
||||
go-version-file: 'go.mod'
|
||||
- uses: golangci/golangci-lint-action@v3
|
||||
- uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
working-directory: ${{ matrix.gomod }}
|
||||
working-directory: example
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
cache: true
|
||||
check-latest: true
|
||||
go-version-file: 'go.mod'
|
||||
- run: go test -v ./...
|
||||
|
||||
|
||||
31
.github/workflows/releases.yml
vendored
Normal file
31
.github/workflows/releases.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Releases
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*.*.*
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: git fetch --force --tags
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
cache: true
|
||||
check-latest: true
|
||||
go-version-file: 'go.mod'
|
||||
- uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
2
.goreleaser.yml
Normal file
2
.goreleaser.yml
Normal file
@ -0,0 +1,2 @@
|
||||
builds:
|
||||
- skip: true
|
||||
Loading…
Reference in New Issue
Block a user