Merge pull request #373 from prometheus/dependabot/go_modules/golang.… #15
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: CI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_call: | |
| jobs: | |
| test_go: | |
| name: Go tests | |
| runs-on: ubuntu-latest | |
| env: | |
| PROMU: ./promu-intermediate | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install Go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: 1.26.x | |
| - run: go build -o promu-intermediate | |
| - run: make check_license style unused lint test build | |
| - run: rm -v promu promu-intermediate | |
| - run: git diff --exit-code | |
| build: | |
| name: Build for common architectures | |
| runs-on: ubuntu-latest | |
| env: | |
| PROMU: ./promu-intermediate | |
| strategy: | |
| matrix: | |
| thread: [ 0, 1, 2, 3] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install Go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: 1.26.x | |
| - run: go build -o promu-intermediate | |
| - run: ./promu-intermediate crossbuild -v --parallelism 4 --parallelism-thread ${{ matrix.thread }} | |
| - uses: prometheus/promci-artifacts/save@f9a587dbc0b2c78a0c54f8ad1cde71ea29a4b76f # v0.1.0 | |
| publish_release: | |
| name: Publish release artifacts | |
| runs-on: ubuntu-latest | |
| needs: [test_go, build] | |
| if: | | |
| (github.repository == 'prometheus/promu') | |
| && | |
| (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: prometheus/promci/publish_release@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0 | |
| with: | |
| github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }} |