-
Notifications
You must be signed in to change notification settings - Fork 11
Migrate to gha only #615
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
Migrate to gha only #615
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c45b8eb
ci: update release workflow to use a single checksums.txt file
james-nesbitt 9f0a01a
fix: correct local build target in Makefile
james-nesbitt 75affb6
build: remove release-related Makefile targets
james-nesbitt cbbc8c4
fix: remove duplicate go statements in go.mod
james-nesbitt d138b64
ci: add comprehensive PR validation workflow
james-nesbitt 53c4ad8
ci: restrict GITHUB_TOKEN permissions in PR workflow
james-nesbitt 41d51d6
Potential fix for code scanning alert no. 20: Workflow does not conta…
james-nesbitt 417cbbb
Potential fix for code scanning alert no. 15: Workflow does not conta…
james-nesbitt dbd5c6d
Potential fix for code scanning alert no. 13: Workflow does not conta…
james-nesbitt b8e2d00
fix(deps): upgrade github.com/ulikunitz/xz to v0.5.15 (GO-2025-3922)
james-nesbitt dd3d2e6
fix(gha): deduplicate PR workflows (linting/tests)
james-nesbitt 8295aa8
fix(gha): skip PR checks for docs-only changes
james-nesbitt 7130d0d
fix(gha): restrict GITHUB_TOKEN permissions (CodeQL)
james-nesbitt 9ada3fd
chore(make): remove unused variables and simplify commands
james-nesbitt 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 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,64 @@ | ||
| # Build and test workflow for Launchpad | ||
| # Triggered on PRs and pushes to main. | ||
|
|
||
| name: Build and Test | ||
| permissions: | ||
| contents: read | ||
| packages: write # Required for uploading artifacts | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Binaries | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.25" | ||
|
|
||
| - name: Build binaries | ||
| run: | | ||
| mkdir -p dist | ||
| platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64") | ||
| for platform in "${platforms[@]}"; do | ||
| GOOS=${platform%/*} | ||
| GOARCH=${platform#*/} | ||
| output_name="dist/launchpad_${GOOS}_${GOARCH}" | ||
| if [ "$GOOS" = "windows" ]; then | ||
| output_name+=".exe" | ||
| fi | ||
| echo "Building $output_name" | ||
| GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go | ||
| done | ||
|
|
||
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: launchpad-binaries | ||
| path: dist/ | ||
|
|
||
| test: | ||
| name: Run Tests | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.22" | ||
|
|
||
| - name: Run unit tests | ||
| run: go test -v ./... | ||
|
|
||
| - name: Run integration tests | ||
| run: go test -v -tags=integration ./test/integration | ||
|
|
||
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,88 @@ | ||
| # PR validation workflow for Launchpad | ||
| # Triggered on PRs to main branch. | ||
|
|
||
| name: PR Validation | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write # Required for PR comments or labels | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main ] | ||
| paths: | ||
| - "**.go" | ||
| - "go.mod" | ||
| - "go.sum" | ||
| - "test/**" | ||
| - "examples/**" | ||
| - ".github/workflows/**" | ||
| paths-ignore: | ||
| - "**.md" | ||
| - "docs/**" | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint Code | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.25" | ||
|
|
||
| - name: Run golangci-lint | ||
| run: make lint | ||
|
|
||
| unit-test: | ||
|
|
||
| name: Unit Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.25" | ||
|
|
||
| - name: Run unit tests | ||
| run: make unit-test | ||
|
|
||
| integration-test: | ||
|
|
||
| name: Integration Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.25" | ||
|
|
||
| - name: Run integration tests | ||
| run: make integration-test | ||
|
|
||
|
|
||
|
|
||
| security-scan: | ||
| name: Security Scan | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.25" | ||
|
|
||
| - name: Install govulncheck | ||
| run: go install golang.org/x/vuln/cmd/govulncheck@latest | ||
|
|
||
| - name: Run security scan | ||
| run: govulncheck ./... | ||
|
|
||
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,71 @@ | ||
| # Release workflow for Launchpad | ||
| # Triggered on tags (e.g., v1.5.16). | ||
|
|
||
| name: Release | ||
| permissions: | ||
| contents: read # Top-level: Restricts all jobs by default | ||
| packages: write # Required for uploading artifacts | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Release Binaries | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.25" | ||
|
|
||
| - name: Build binaries | ||
| run: | | ||
| mkdir -p dist | ||
| platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64") | ||
| for platform in "${platforms[@]}"; do | ||
| GOOS=${platform%/*} | ||
| GOARCH=${platform#*/} | ||
| output_name="dist/launchpad_${GOOS}_${GOARCH}" | ||
| if [ "$GOOS" = "windows" ]; then | ||
| output_name+=".exe" | ||
| fi | ||
| echo "Building $output_name" | ||
| GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go | ||
| done | ||
|
|
||
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: launchpad-release-binaries | ||
| path: dist/ | ||
|
|
||
| release: | ||
|
|
||
| name: Create GitHub Release | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Download binaries | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: launchpad-release-binaries | ||
| path: dist/ | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: dist/* | ||
| generate_release_notes: true | ||
| draft: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| # TODO: Add Digicert signing here. | ||
| # TODO: Push signed artifacts to S3 here. | ||
|
|
||
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
Oops, something went wrong.
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.