feat: concurrent upgrade/apply with --max-parallel=... flag #29
Workflow file for this run
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: release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| packages: write | |
| pull-requests: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 | |
| with: | |
| go-version: stable | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4 | |
| - name: Login to GHCR | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Compute previous stable tag | |
| id: prev-tag | |
| run: | | |
| CURRENT_TAG="${{ github.ref_name }}" | |
| STABLE_TAGS=$(git tag -l 'v*' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V) | |
| PREV_TAG=$(echo "$STABLE_TAGS" | grep -B1 "^${CURRENT_TAG}$" | head -1) | |
| if [ -z "$PREV_TAG" ] || [ "$PREV_TAG" = "$CURRENT_TAG" ]; then | |
| PREV_TAG=$(echo "$STABLE_TAGS" | grep -v "^${CURRENT_TAG}$" | tail -1) | |
| fi | |
| echo "range=${PREV_TAG}..${CURRENT_TAG}" >> "$GITHUB_OUTPUT" | |
| - name: Generate release notes | |
| uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # v4 | |
| id: git-cliff | |
| with: | |
| config: cliff.toml | |
| args: --strip header --tag ${{ github.ref_name }} ${{ steps.prev-tag.outputs.range }} | |
| env: | |
| OUTPUT: CHANGES.md | |
| GITHUB_REPO: ${{ github.repository }} | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7 | |
| with: | |
| version: latest | |
| args: release --clean --release-notes=CHANGES.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| - name: Deploy versioned docs | |
| if: "!contains(github.ref_name, '-')" | |
| run: | | |
| pip install mkdocs-material mdx-truly-sane-lists mike | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| mike deploy --push --update-aliases ${{ github.ref_name }} latest | |
| - name: Generate full changelog | |
| if: "!contains(github.ref_name, '-')" | |
| uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # v4 | |
| with: | |
| config: cliff.toml | |
| env: | |
| OUTPUT: CHANGELOG.md | |
| GITHUB_REPO: ${{ github.repository }} | |
| - name: Commit changelog | |
| if: "!contains(github.ref_name, '-')" | |
| run: | | |
| git checkout main | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| set +e | |
| git add CHANGELOG.md | |
| git commit -m "chore: update changelog" | |
| git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git main |