tijl.dev-core/.gitea/workflows/build.yaml

53 lines
959 B
YAML
Raw Normal View History

2024-08-19 22:37:57 +02:00
name: build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
github-server-url: 'https://git.tijl.dev'
2024-08-21 23:49:31 +02:00
- name: Set up node
uses: actions/setup-node@v4
2024-08-22 00:14:56 +02:00
- name: Install npm
run: npm install
2024-08-22 00:44:48 +02:00
2024-08-19 22:37:57 +02:00
- name: Build css
run: npm run build:css
- name: Build js
run: npm run build
2024-08-20 11:49:05 +02:00
- name: Set up Go
2024-08-22 00:44:48 +02:00
uses: actions/setup-go@v5
2024-08-20 11:49:05 +02:00
with:
go-version: '1.22'
2024-08-21 23:49:31 +02:00
- name: Generate templ code
uses: capthiron/templ-generator-action@v1
with:
commit: "false"
setup-go: "false"
go-version: "1.22"
2024-08-19 22:37:57 +02:00
- name: Build
2024-08-22 13:47:16 +02:00
run: go build -o tijldev cmd/server/main.go
- name: Release
2024-08-22 13:48:51 +02:00
uses: https://gitea.com/actions/gitea-release-action@v1
2024-08-22 13:47:16 +02:00
with:
files: |-
tijldev
2024-08-22 13:50:49 +02:00
token: '${{secrets.RELEASE_TOKEN}}'
2024-08-19 22:37:57 +02:00