-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from enthus-golang/fk_workflow
Updated workflows
- Loading branch information
Showing
5 changed files
with
91 additions
and
37 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## [go-licenses](https://github.com/google/go-licenses) report | ||
|
||
{{- range . }} | ||
- {{ .Name }} ({{ .Version }}) [{{ .LicenseName }}]({{ .LicenseURL }}) | ||
{{- end }} |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' # Trigger on version tags like v1.0.0, v2.1.0, etc. | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
- name: Generate Changelog | ||
id: changelog | ||
uses: mikepenz/release-changelog-builder-action@v5 | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: Release ${{ github.ref_name }} | ||
body: ${{ steps.changelog.outputs.changelog }} # Attach changelog |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: License Go | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
license-check: | ||
runs-on: ubuntu-latest | ||
name: License Check | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
- name: Install go-licenses | ||
run: go install github.com/google/go-licenses@latest | ||
|
||
- name: Check licenses | ||
run: go-licenses check ./... | ||
|
||
license-report: | ||
runs-on: ubuntu-latest | ||
name: License Report | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
- name: Install go-licenses | ||
run: go install github.com/google/go-licenses@latest | ||
|
||
- name: Report to GitHub Step Summary | ||
run: > | ||
go-licenses report ./... | ||
--template .github/templates/go-licenses.md.tpl | ||
>> $GITHUB_STEP_SUMMARY | ||
shell: bash |