feat: add list output mode for compact hand summaries (#34) #33
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: Auto Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cashapp/activate-hermit@v1 | |
| - name: Install code generation tools | |
| run: task tools | |
| - name: Generate code | |
| run: task generate | |
| - name: Run tests | |
| run: task test | |
| release: | |
| name: Create Release | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - uses: cashapp/activate-hermit@v1 | |
| - name: Calculate next version | |
| id: version | |
| run: | | |
| NEXT_VERSION=$(svu next) | |
| CURRENT_VERSION=$(svu current) | |
| echo "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT | |
| echo "next=$NEXT_VERSION" >> $GITHUB_OUTPUT | |
| if [ "$CURRENT_VERSION" = "$NEXT_VERSION" ]; then | |
| echo "should_release=false" >> $GITHUB_OUTPUT | |
| echo "No version bump needed" | |
| else | |
| echo "should_release=true" >> $GITHUB_OUTPUT | |
| echo "Version bump: $CURRENT_VERSION -> $NEXT_VERSION" | |
| fi | |
| - name: Create tag | |
| if: steps.version.outputs.should_release == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a ${{ steps.version.outputs.next }} -m "Release ${{ steps.version.outputs.next }}" | |
| git push origin ${{ steps.version.outputs.next }} | |
| - name: Set up QEMU | |
| if: steps.version.outputs.should_release == 'true' | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| if: steps.version.outputs.should_release == 'true' | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| if: steps.version.outputs.should_release == 'true' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run GoReleaser | |
| if: steps.version.outputs.should_release == 'true' | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.next }} |