feat!: Update GitHub actions to work with templ and bun

This commit is contained in:
Christian Ditaputratama 2024-10-29 21:03:42 +07:00
parent be32011cfa
commit 35d53c8a58
No known key found for this signature in database
GPG key ID: 31D3D06D77950979
4 changed files with 23 additions and 47 deletions

View file

@ -10,14 +10,3 @@ updates:
- ditatompel
assignees:
- ditatompel
- package-ecosystem: "npm"
directory: "/frontend"
schedule:
interval: weekly
time: "05:00"
open-pull-requests-limit: 5
reviewers:
- ditatompel
assignees:
- ditatompel

View file

@ -14,25 +14,20 @@ jobs:
- name: Check out source code
uses: actions/checkout@v4
- name: setup NodeJS
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Setup templ
run: go install github.com/a-h/templ/cmd/templ@v0.2.778
- name: Prepare assets
run: make prepare
- name: Cache Go modules
uses: actions/cache@v3
with:

View file

@ -16,20 +16,20 @@ jobs:
- name: Check out source code
uses: actions/checkout@v4
- name: setup NodeJS
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Setup templ
run: go install github.com/a-h/templ/cmd/templ@v0.2.778
# Need to build the UI here before build the server binary with go-release-action
- name: Build UI
run: make ui
- name: Prepare assets
run: make prepare templ tailwind
- name: Build server binary
uses: wangyoucao577/go-release-action@v1

View file

@ -12,11 +12,17 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Setup templ
run: go install github.com/a-h/templ/cmd/templ@v0.2.778
- name: Cache Go modules
uses: actions/cache@v3
with:
@ -25,22 +31,8 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: setup NodeJS
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build UI
run: make ui
- name: Prepare assets
run: make prepare templ tailwind
- name: Run lint
uses: golangci/golangci-lint-action@v4