-
-
Notifications
You must be signed in to change notification settings - Fork 2
CI maintenance including verifiable builds #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4abd64c
ci: use go-version-file to set version
mroth 1f26dd5
ci: ensure restrictive permissions on GHA workflows
mroth 65a40d1
chore: remove editorconfig file
mroth e0075f1
chore: run modernize -fix -test
mroth c20f155
chore: add security policy file
mroth ad270c4
chore: lint style fix, simplification
mroth d2985c1
ci: pin all GHA workflow versions (security)
mroth 03b11f0
ci: enable build attestations
mroth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,14 @@ | ||
| # Security Policy | ||
|
|
||
| ## Automated Scans | ||
|
|
||
| The following automated security scans are performed on a regular basis for this repository via continuous integration: | ||
|
|
||
| - CodeQL analysis | ||
|
|
||
| ## Reporting a Vulnerability | ||
|
|
||
| This repository has GitHub private vulnerability reporting enabled. | ||
|
|
||
| To report a security vulnerability please follow the guide at: | ||
| https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability |
This file contains hidden or 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,31 +1,35 @@ | ||
| name: goreleaser | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| - "v*" | ||
|
|
||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| attestations: write | ||
|
|
||
| jobs: | ||
| goreleaser: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| - run: git fetch --force --tags | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | ||
| with: | ||
| go-version: "1.24" | ||
| go-version-file: "go.mod" | ||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@v6 | ||
| uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0 | ||
| with: | ||
| distribution: goreleaser | ||
| version: "~> v2" | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} | ||
| # After GoReleaser runs, attest all the files in ./dist/checksums.txt: | ||
| - uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0 | ||
| with: | ||
| subject-checksums: ./dist/checksums.txt |
This file contains hidden or 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,14 +1,16 @@ | ||
| on: push | ||
| name: Test | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Go unit tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | ||
| with: | ||
| fetch-depth: 1 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.24" | ||
| - run: go mod download | ||
| go-version-file: "go.mod" | ||
| - run: go test ./... | ||
This file contains hidden or 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,40 +1,53 @@ | ||
| # yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
| # vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
| version: 2 | ||
|
|
||
| before: | ||
| hooks: | ||
| - go mod download | ||
|
|
||
| builds: | ||
| - env: | ||
| - CGO_ENABLED=0 | ||
| goos: | ||
| - linux | ||
| - darwin | ||
| - windows | ||
| goarch: | ||
| - amd64 | ||
| - arm64 | ||
| # Custom ldflags templates. | ||
| # Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}`. | ||
| ldflags: | ||
| - -s -w -X main.buildVersion={{.Version}} -X main.buildCommit={{.ShortCommit}} -X main.buildDate={{.Date}} | ||
| archives: | ||
| - format_overrides: | ||
| - goos: windows | ||
| formats: [ 'zip' ] | ||
| universal_binaries: | ||
| - replace: true | ||
| - env: | ||
| - CGO_ENABLED=0 | ||
| goos: | ||
| - linux | ||
| - darwin | ||
| - windows | ||
| goarch: | ||
| - amd64 | ||
| - arm64 | ||
| ldflags: | ||
| - -s -w -X main.buildVersion={{.Version}} -X main.buildCommit={{.ShortCommit}} -X main.buildDate={{.Date}} | ||
|
|
||
| gomod: | ||
| # Proxy a module from proxy.golang.org, making the builds verifiable. | ||
| # This will only be effective if running against a tag. Snapshots will ignore | ||
| # this setting. | ||
| # Notice: for this to work your `build.main` must be a package, not a `.go` file. | ||
| proxy: true | ||
|
|
||
| # static file path for checksums for build attestations | ||
| checksum: | ||
| name_template: 'checksums.txt' | ||
| snapshot: | ||
| version_template: "{{ .Tag }}-next" | ||
| name_template: "checksums.txt" | ||
|
|
||
| archives: | ||
| - format_overrides: | ||
| - goos: windows | ||
| formats: ["zip"] | ||
|
|
||
| # disable changelog generation entirely, since bump will manage that itself! | ||
| changelog: | ||
| disable: true | ||
|
|
||
| release: | ||
| # If set to auto, will mark the release as not ready for production | ||
| # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 | ||
| prerelease: auto | ||
|
|
||
| brews: | ||
| - | ||
| repository: | ||
| - repository: | ||
| owner: mroth | ||
| name: homebrew-tap | ||
| description: "Draft GitHub Release of the next semver in web browser" | ||
| homepage: "https://github.com/mroth/bump" | ||
| skip_upload: false | ||
| # disable changelog generation entirely, since bump will manage that itself! | ||
| changelog: | ||
| disable: true |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.