Add experimental to list of latest branches #108
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
| name: Go | |
| on: [push, pull_request] | |
| env: | |
| GO_VERSION: "1.25" | |
| GOTOOLCHAIN: local | |
| CGO_ENABLED: 0 | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| - name: Install dependencies | |
| run: | | |
| go install golang.org/x/tools/cmd/goimports@latest | |
| go install honnef.co/go/tools/cmd/staticcheck@latest | |
| export PATH="$HOME/go/bin:$PATH" | |
| - name: Run pre-commit | |
| uses: pre-commit/action@v3.0.1 | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| - name: Build | |
| run: go build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: bridge-cd-tool | |
| path: bridge-cd-tool | |
| if-no-files-found: error | |
| deploy: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: [build, lint] | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: bridge-cd-tool | |
| path: bridge-cd-tool | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: bridge-cd-tool | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |