fix(switch): resolve main worktree path from worktree list instead of… #56
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "lts/*" | |
| - name: Semantic Release | |
| id: semantic | |
| uses: cycjimmy/semantic-release-action@v4 | |
| with: | |
| extra_plugins: | | |
| @semantic-release/changelog | |
| @semantic-release/git | |
| conventional-changelog-conventionalcommits | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
| - uses: actions/setup-go@v5 | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| with: | |
| go-version: stable | |
| - name: Checkout new tag | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: | | |
| git fetch --tags | |
| git checkout v${{ steps.semantic.outputs.new_release_version }} | |
| - uses: goreleaser/goreleaser-action@v5 | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
| BREW_TAP_TOKEN: ${{ secrets.BREW_TAP_TOKEN }} |