Skip to content

Commit

Permalink
Added templ generate to workflow (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
brijesh-amin authored Jul 12, 2024
1 parent 247b46a commit 736eb26
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.1'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5.0.0
go-version: '1.22.x'
{{if or ( .AdvancedOptions.htmx ) ( .AdvancedOptions.tailwind )}}
- name: Install templ
shell: bash
run: go install github.com/a-h/templ/cmd/templ@latest
- name: Run templ generate
shell: bash
run: templ generate -path .
{{end}}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: ${{"{{"}} env.GITHUB_REF_NAME {{"}}"}}
args: release --clean
workdir: ./
env:
GITHUB_TOKEN: ${{"{{"}} secrets.GITHUB_TOKEN {{"}}"}}
GITHUB_TOKEN: ${{"{{"}} secrets.GITHUB_TOKEN {{"}}"}}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
go-version: '1.22.x'
{{if or ( .AdvancedOptions.htmx ) ( .AdvancedOptions.tailwind )}}
- name: Install templ
shell: bash
run: go install github.com/a-h/templ/cmd/templ@latest
- name: Run templ generate
shell: bash
run: templ generate -path .
{{end}}
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test ./...
run: go test ./...
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -38,4 +39,4 @@ archives:
- README.md

checksum:
name_template: 'checksums.txt'
name_template: 'checksums.txt'

0 comments on commit 736eb26

Please sign in to comment.