codegen: resync gen/ from EF 6ac0bdec (#118) #100
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: Dev Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: dev-release | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: main | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Run tests | |
| run: make test | |
| - name: Compute dev version | |
| id: compute | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| latest_stable="$(git tag --list 'v*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" | |
| if [[ -z "$latest_stable" ]]; then | |
| latest_stable="v0.0.0" | |
| fi | |
| base="$(echo "$latest_stable" | sed 's/^v//' | awk -F. '{printf "%d.%d.%d", $1, $2, $3 + 1}')" | |
| version="v${base}-dev.$(date -u +%Y%m%d%H%M)" | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| - name: Create git tag | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| version="${{ steps.compute.outputs.version }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git tag "$version" | |
| git push origin "$version" | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: "~> v2" | |
| args: release --clean --skip=validate | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |