This commit is contained in:
49
.gitea/workflows/build.yml
Normal file
49
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Build Urlshort
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout código
|
||||
run: |
|
||||
git clone https://fedesrv.ddns.net/git/${{ github.repository }}.git .
|
||||
git checkout ${{ github.sha }}
|
||||
|
||||
- name: Setup Go 1.21.x
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of Go
|
||||
go-version: '1.21.7'
|
||||
|
||||
- name: Install dependencias go
|
||||
run: go get .
|
||||
|
||||
- name: build binary go
|
||||
run: go build -v .
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: build proyect
|
||||
run: |
|
||||
cd front
|
||||
bun run build
|
||||
|
||||
- name: copy artifacts
|
||||
run: |
|
||||
mkdir -p upload
|
||||
cp ./url-short upload/
|
||||
cp -r front/dist upload/
|
||||
echo "Upload complete"
|
||||
|
||||
- name: Upload dist
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: upload
|
||||
7
go.mod
7
go.mod
@@ -2,11 +2,14 @@ module url-short
|
||||
|
||||
go 1.25.7
|
||||
|
||||
require (
|
||||
gorm.io/driver/sqlite v1.6.0
|
||||
gorm.io/gorm v1.31.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.34 // indirect
|
||||
golang.org/x/text v0.35.0 // indirect
|
||||
gorm.io/driver/sqlite v1.6.0 // indirect
|
||||
gorm.io/gorm v1.31.1 // indirect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user