Skip to content

syntax

syntax #41

Workflow file for this run

name: main
on:
push:
paths-ignore:
- ".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: "v0.4.1"
includePrereleases: true
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
id: build_docs
run: yabs docs_build
# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# # Build output to publish to the `gh-pages` branch:
# publish_dir: ./docs/build
# # The following lines assign commit authorship to the official
# # GH-Actions bot for deploys to `gh-pages` branch:
# # https://github.com/actions/checkout/issues/13#issuecomment-724415212
# # The GH actions bot is used by default if you didn't specify the two fields.
# # You can swap them out with your own user credentials.
# user_name: github-actions[bot]
# user_email: 41898282+github-actions[bot]@users.noreply.github.com
- name: Deploy to GitHub Pages
if: steps.build_docs.outputs.BUILD_DOCS == 'true'
run: echo "Deploying to GitHub Pages!!"
- name: prune
run: yabs prune