refactor #34
This file contains 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: main | ||
on: | ||
push: | ||
paths-ignore: | ||
- "docs/**" | ||
- ".github/workflows/docs.yml" | ||
jobs: | ||
all: | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# - name: Set up Go | ||
# uses: actions/setup-go@v4 | ||
# with: | ||
# go-version: "1.20.5" | ||
# - name: Set up yabs | ||
# run: go install github.com/jakegut/yabs/cmd/yabs@latest | ||
- name: Set up yabs | ||
uses: engineerd/configurator@v0.0.9 | ||
with: | ||
name: "yabs" | ||
fromGitHubReleases: "true" | ||
pathInArchive: "yabs" | ||
repo: "jakegut/yabs" | ||
version: "latest" | ||
urlTemplate: "https://github.com/jakegut/yabs/releases/download/{{version}}/yabs_linux_amd64.tar.gz" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache | ||
# Use a more aggressive caching key | ||
- name: Cache yabs | ||
uses: actions/cache@v3 | ||
with: | ||
path: .yabs | ||
key: yabs-cache-${{ runner.os }}-${{ github.run_id }} | ||
restore-keys: | | ||
yabs-cache-${{ runner.os }} | ||
- name: lint | ||
run: yabs lint | ||
- name: test | ||
run: yabs test | ||
- name: release | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: yabs release | ||
- name: Build Docs | ||
env: | ||
run: yabs docs_build | ||
- name: prune | ||
run: yabs prune |