fix spec registry #11625
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: Go | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/carapace-sh/go:1.25.4 | |
| steps: | |
| - name: shallow clone | |
| uses: actions/checkout@v6 | |
| if: "!startsWith(github.ref, 'refs/tags/')" | |
| - name: deep clone | |
| uses: actions/checkout@v6 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| fetch-depth: 0 | |
| - name: fix git safe.directory | |
| run: git config --global --add safe.directory '*' | |
| - name: Generate | |
| run: go generate ./cmd/... | |
| - name: Build | |
| run: ls cmd/ | xargs -I'{}' sh -c "cd ./cmd/{} && go install -v -tags force_all ." | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: carapace | |
| path: /go/bin/carapace | |
| retention-days: 1 | |
| - name: Test | |
| run: go test -v ./cmd/... | |
| - name: "Check formatting" | |
| run: '[ "$(gofmt -d -s . | tee -a /dev/stderr)" = "" ]' | |
| - name: "staticcheck" | |
| run: go install honnef.co/go/tools/cmd/staticcheck@latest && staticcheck ./... | |
| - name: "carapace-lint" | |
| run: go run ./cmd/carapace-lint completers/*/*/cmd/*.go | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| AUR_KEY: ${{ secrets.AUR_KEY }} | |
| FURY_TOKEN: ${{ secrets.FURY_TOKEN }} | |
| GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} | |
| doc: | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/carapace-sh/mdbook | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: carapace | |
| path: /usr/local/bin | |
| - name: Cache linkcheck | |
| uses: actions/cache@v5 | |
| with: | |
| key: linkcheck | |
| path: ./docs/book/linkcheck/cache.json | |
| - name: "build docs" | |
| run: | | |
| chmod +x /usr/local/bin/carapace | |
| sed -i 's/^follow-web-links.*/follow-web-links = false/' docs/book.toml | |
| sh .github/completers.sh > docs/src/completers.md | |
| sh .github/conditions.sh > docs/src/variable/conditions.md | |
| sh .github/macros.sh > docs/src/spec/macros.md | |
| mdbook build docs | |
| sh .github/badge.sh > docs/book/html/badge.svg | |
| sh .github/macros-badge.sh > docs/book/html/macros-badge.svg | |
| sh docs/postprocessor/opengraph.sh | |
| - name: "push gh-pages" | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| cd docs/book/html/ | |
| git init | |
| git config user.name rsteube | |
| git config user.email [email protected] | |
| git add . | |
| git commit -m "initial commit [ci skip]" | |
| git push --force https://rsteube:${GITHUB_TOKEN}@github.com/carapace-sh/carapace-bin.git master:gh-pages | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| winget: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: vedantmgoyal2009/winget-releaser@v2 | |
| with: | |
| identifier: rsteube.Carapace | |
| max-versions-to-keep: 5 | |
| installers-regex: '_windows_amd64\.zip$' | |
| fork-user: rsteube-bot | |
| token: ${{ secrets.WINGET_TOKEN }} |