-
Notifications
You must be signed in to change notification settings - Fork 0
ci: update the release process (WIP) #29
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: PR Check | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Run tests | ||
| run: go test -v ./... | ||
|
|
||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Check formatting | ||
| run: | | ||
| unformatted="$(gofmt -s -l .)" | ||
| if [ -n "$unformatted" ]; then | ||
| echo "Files need formatting (run gofmt -s -w .):" | ||
| echo "$unformatted" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Run golangci-lint | ||
| uses: golangci/golangci-lint-action@v6 | ||
| with: | ||
| version: latest | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,85 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
+9
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| name: release-please | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| release-please: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||
| outputs: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| release_created: ${{ steps.release.outputs.release_created }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| tag_name: ${{ steps.release.outputs.tag_name }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| version: ${{ steps.release.outputs.version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: googleapis/release-please-action@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| id: release | ||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| release-type: simple | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| release-type: simple | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go build -ldflags "-X ...version.Version=..." will fail with the current code because internal/redyl/version.Version is declared as a const (linker -X can only set string variables). Change the version symbol to a var (e.g., defaulting to "dev") or remove the -X injection and update versioning another way.
| -ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \ | |
| -o "bin/${binary_name}.exe" . | |
| zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe" | |
| rm "bin/${binary_name}.exe" | |
| else | |
| go build \ | |
| -ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \ | |
| -o "bin/${binary_name}.exe" . | |
| zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe" | |
| rm "bin/${binary_name}.exe" | |
| else | |
| go build \ |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as the Windows branch: linker -X cannot set a const. With internal/redyl/version.Version currently a constant, this build command will fail; switch it to a var or stop using -X to set it.
| -ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \ | |
| -o "bin/${binary_name}.exe" . | |
| zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe" | |
| rm "bin/${binary_name}.exe" | |
| else | |
| go build \ | |
| -ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \ | |
| -o "bin/${binary_name}.exe" . | |
| zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe" | |
| rm "bin/${binary_name}.exe" | |
| else | |
| go build \ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "1.1.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "packages": { | ||
| ".": { | ||
| "release-type": "simple", | ||
| "include-v-in-tag": true | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.