Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: pass bin as artifact #1094

Merged
merged 1 commit into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/macros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ scriptdir=$(dirname $(readlink -f $0))
echo "# Macros"
echo

grep -A1000 macroDescriptions $scriptdir/../cmd/carapace/cmd/macros.go \
| grep "\t" \
| sed 's_^\t"\([^"]*\.\)\([^. ]\+\)": \+"\(.*\)",$_- [\1\2]\(https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/\1#Action\2) \3_' \
$scriptdir/../cmd/carapace/carapace --macros \
| sed 's_^\([^ ]*\.\)\([^. ]\+\) \+\(.*\)_- [\1\2]\(https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/\1#Action\2) \3_' \
| sed -e ':loop' -e 's_\(carapace-bin/pkg/actions/[^#]*\)[.]_\1/_' -e 't loop'
15 changes: 13 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ jobs:
- name: Generate
run: go generate ./cmd/...


- name: Build
run: go build -v ./cmd/...
run: ls cmd/ | xargs -I'{}' sh -c "cd ./cmd/{} && go build -v ."

- uses: actions/upload-artifact@v2
with:
name: carapace
path: ./cmd/carapace/carapace

- name: Test
run: go test -v ./cmd/...
Expand Down Expand Up @@ -58,15 +62,22 @@ jobs:
doc:
runs-on: ubuntu-latest
container: ghcr.io/rsteube/carapace
needs: build
steps:
- uses: actions/checkout@v2

- uses: actions/download-artifact@v2
with:
name: carapace

- name: "build docs"
run: |
sed -i 's/\[output.linkcheck\]/#[output.linkcheck]/' docs/book.toml
sh .github/completers.sh > docs/src/completers.md
sh .github/macros.sh > docs/src/specs/macros.md
mdbook build docs
sh .github/badge.sh > docs/book/badge.svg

- name: "push gh-pages"
if: github.ref == 'refs/heads/master'
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
cmd/carafmt/carafmt
cmd/caralint/caralint
cmd/carapace/carapace
cmd/carapace/cmd/completers.go
cmd/carapace/cmd/completers_release.go
cmd/carapace/cmd/macros.go
cmd/caraparse/caraparse
cmd/generate/generate
completers/*/*_completer
completers/gh_completer/cmd/action/api.git.luolix.top.json
completers_release
Expand Down