Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from CycloneDX/actions-timeouts-permissions
Multiple tweaks to Actions
- Loading branch information
Showing
3 changed files
with
105 additions
and
84 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
name: goreleaser | ||
name: GoReleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
name: Release | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3.0.0 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3.0.0 | ||
with: | ||
go-version: "1.17" | ||
check-latest: true | ||
- name: Generate SBOM | ||
uses: CycloneDX/gh-gomod-generate-sbom@v1 | ||
with: | ||
version: v1 | ||
args: mod -licenses -json -output bom.json -type library -verbose | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3.0.0 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3.0.0 | ||
with: | ||
go-version: "1.17" | ||
check-latest: true | ||
- name: Install cyclonedx-gomod | ||
uses: CycloneDX/gh-gomod-generate-sbom@v1 | ||
with: | ||
version: v1 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,44 @@ | ||
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 | ||
# 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 | ||
prerelease: auto | ||
|
||
source: | ||
enabled: true | ||
|
||
sboms: | ||
- artifacts: source | ||
documents: | ||
- "${artifact}.cdx.sbom" | ||
cmd: cyclonedx-gomod | ||
args: [ "mod", "-licenses", "-json", "-output", "$document", "./.." ] | ||
|
||
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 ' |