Skip to content

Commit

Permalink
chore: cleanup workflows
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Dec 2, 2022
1 parent 50700c3 commit af71f76
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 67 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,40 @@ name: CI
on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

permissions: { }

jobs:
golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- name: Setup Go
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
with:
go-version: "1.18"
check-latest: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # tag=v3.3.1
with:
version: latest
- name: Checkout Repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- name: Setup Go
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # tag=v3.4.0
with:
go-version: "1.18"
check-latest: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # tag=v3.3.1
with:
version: latest

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
with:
go-version: "1.18"
check-latest: true
- name: Checkout Repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- name: Test
run: make test
- name: Setup Go
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # tag=v3.4.0
with:
go-version: "1.18"
check-latest: true
- name: Checkout Repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- name: Test
run: make test
41 changes: 20 additions & 21 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@ name: goreleaser
on:
push:
tags:
- 'v*'
- 'v*'

permissions: { }

jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
with:
go-version: "1.18"
- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@d4aee0cf5133055dbd98899978246c10c18c440f # tag=v1.1.0
with:
args: mod -licenses -type library -json -output bom.json
version: v1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # tag=v3.2.0
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # tag=v3.4.0
with:
go-version: "1.18"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # tag=v3.2.0
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 21 additions & 24 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
builds:
# This is a library project, we don't want to build any binaries.
# Building and testing is performed in the CI workflow
- skip: true
release:
extra_files:
- glob: ./bom.json
# This is a library project, we don't want to build any binaries.
# Building and testing is performed in the CI workflow
- skip: true
milestones:
- name_template: "{{ .Tag }}"
close: true
- name_template: "{{ .Tag }}"
close: true
changelog:
use: github
sort: asc
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: Fixes
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Building and Packaging
regexp: "^.*build[(\\w)]*:+.*$"
order: 2
- title: Documentation
regexp: "^.*docs[(\\w)]*:+.*$"
order: 3
- title: Others
order: 999
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: Fixes
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Building and Packaging
regexp: "^.*build[(\\w)]*:+.*$"
order: 2
- title: Documentation
regexp: "^.*docs[(\\w)]*:+.*$"
order: 3
- title: Others
order: 999
filters:
exclude:
- '^test:'
- '^Merge '
- '^test:'
- '^Merge '

0 comments on commit af71f76

Please sign in to comment.