diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..00db4fe --- /dev/null +++ b/.gitea/workflows/build.yml @@ -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 diff --git a/go.mod b/go.mod index a505d45..9d400d2 100644 --- a/go.mod +++ b/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 )