Skip to content

Commit

Permalink
Back to 1.22 and CI: vhs from root
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Miller committed Feb 22, 2024
1 parent 43ed4ec commit 37f7e92
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 12 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/vhs.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: vhs

env:
EXAMPLE_NAME: deeper

permissions:
contents: write

on:
push:
paths:
- "**/*.tape"
- "**/vhs.yml"

jobs:
vhs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./examples/deeper
steps:
- uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.6
go-version: 1.22.0

- name: Build Examples
run: go build -o ./bin/deeper ./examples/deeper/*.go

- name: Create demo GIF
uses: charmbracelet/vhs-action@v2
env:
TERM: xterm-256color
working-directory: ./examples/deeper
with:
path: "demo.tape"

path: ./examples/deeper/demo.tape

- name: Move demo GIF to examples/deeper; cleanup
run: mv demo.gif examples/deeper/demo.gif && rm -rf ./bin

- name: Commit and push demo.gif
uses: stefanzweifel/git-auto-commit-action@v4
env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
bin/*
.task
55 changes: 55 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: '3'

tasks:
default:
deps:
- go-build

clean:
deps:
- go-clean

# Things we need to install to do dev work
# brew install ffmpeg
dev-deps:
cmds:
- go install github.com/charmbracelet/vhs@latest

###########################################################
## Golang

go-tidy:
cmds:
- go mod tidy

go-build:
deps:
- deeper
- simple

go-clean:
cmds:
- rm -f bin/*

go-update:
cmds:
- go get -u ./...

deeper:
deps: [go-tidy]
cmds:
- go build -o bin/deeper examples/deeper/*.go
sources:
- ./**/*.go
generates:
- bin/deeper

simple:
deps: [go-tidy]
cmds:
- go build -o bin/simple examples/simple/*.go
sources:
- ./**/*.go
generates:
- bin/simple

2 changes: 1 addition & 1 deletion examples/deeper/demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Set PlaybackSpeed 0.5

Set Shell bash
Sleep 0.5s
Type "go run ."
Type "./bin/deeper"
Enter
Sleep 1.5s
Down
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kevm/bubbleo

go 1.21.6
go 1.22.0

require (
github.com/charmbracelet/bubbles v0.18.0
Expand Down
6 changes: 6 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
go 1.22.0

use (
.
./examples
)
6 changes: 6 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=

0 comments on commit 37f7e92

Please sign in to comment.