-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add changlog releaser. Update changelog. Update docs.
- Loading branch information
Showing
11 changed files
with
119 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
|
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,16 @@ | ||
name: CHANGELOG.md Check | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
verify_changelog_job: | ||
runs-on: ubuntu-latest | ||
name: Did CHANGELOG.md change? | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: fetch | ||
run: git fetch | ||
- name: run changelog.sh | ||
run: 'bash ${GITHUB_WORKSPACE}/.github/workflows/scripts/changelog.sh' |
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,9 +1,6 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
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,10 +1,5 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
golangci: | ||
|
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,52 @@ | ||
name: Release by Changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch to create a release from' | ||
required: true | ||
default: 'main' | ||
version: | ||
description: 'Specify the semantic version for the release (vX.Y.Z)' | ||
required: true | ||
reason: | ||
description: 'Reason for the manual release' | ||
required: false | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GOPROXY: proxy.golang.org,direct | ||
GOPRIVATE: github.com/c2fo,github.com/C2FO | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.branch || github.ref_name }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.24 | ||
|
||
- name: Install and run ReleaseGen | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
GITHUB_ACTOR: ${{ github.actor }} | ||
GITHUB_REF_NAME: ${{ github.event.inputs.branch || github.ref_name }} | ||
MANUAL_VERSION: ${{ github.event.inputs.version || '' }} | ||
REASON: ${{ github.event.inputs.reason || '' }} | ||
CUSTOM_CHANGE_TYPES: | | ||
documentation:patch | ||
run: | | ||
git config --global url."https://c2fo-read-only:${{ secrets.GH_CI_READ }}@github.com/c2fo".insteadOf "https://github.com/c2fo" | ||
go install github.com/c2fo/ep-tools/releasegen@latest | ||
releasegen |
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,36 @@ | ||
#!/bin/bash | ||
|
||
# Find all directories containing a CHANGELOG.md file | ||
changelogDirs=$(find . -type f -name 'CHANGELOG.md' -exec dirname {} \;) | ||
|
||
# Check each directory for changes and ensure CHANGELOG.md is updated | ||
for dir in $changelogDirs; do | ||
echo "Checking directory: $dir" | ||
|
||
# Check if there are any changes in the directory | ||
dirChanges=$(git --no-pager diff -w --numstat origin/main -- $dir | wc -l) | ||
if [[ "$dirChanges" -gt 0 ]]; then | ||
echo "Changes detected in $dir" | ||
|
||
# Check if CHANGELOG.md has been modified | ||
changelogMod=$(git --no-pager diff -w --numstat origin/main -- $dir/CHANGELOG.md) | ||
if [[ -z "$changelogMod" ]]; then | ||
echo "CHANGELOG.md in $dir has not been modified. Please update it with your changes before merging to main." | ||
exit 1 | ||
else | ||
echo "CHANGELOG.md in $dir has been modified. Verifying at least 1 (non-whitespace) line has been added." | ||
changelogLines=$(echo "$changelogMod" | awk '{print $1}') | ||
if [[ "$changelogLines" -lt 1 ]]; then | ||
echo "Didn't detect any substantial changes to CHANGELOG.md in $dir." | ||
exit 1 | ||
else | ||
echo "Detected '$changelogLines' new non-whitespace lines in CHANGELOG.md in $dir. Thanks +1" | ||
fi | ||
fi | ||
else | ||
echo "No changes detected in $dir" | ||
fi | ||
done | ||
|
||
echo "All directories with changes have updated CHANGELOG.md files." | ||
exit 0 |
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
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 |
---|---|---|
|
@@ -166,25 +166,8 @@ Things to add: | |
* Provide better List() functionality with more abstracted filtering and paging (iterator?) Return File structs vs URIs? | ||
* Add better/any context.Context() support | ||
|
||
### Contributors | ||
|
||
Brought to you by the Enterprise Pipeline team at C2FO: | ||
|
||
* John Judd - [email protected] | ||
|
||
* Dustin Schnee - [email protected] | ||
|
||
* Katie Hrenchir Shields - [email protected] | ||
|
||
* Grant Higgins - [email protected] | ||
|
||
* Pooja Dhondge - [email protected] | ||
|
||
* Chris Roush – [email protected] | ||
|
||
* Anthony Ross - [email protected] | ||
|
||
https://github.com/c2fo/ | ||
### Supported Go Versions | ||
This project supports the latest and previous major Go versions. Please ensure you are using one of these versions to avoid compatibility issues. | ||
|
||
### Contributing | ||
|
||
|
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