diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..fd892a8 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,49 @@ +name: Build + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout código + run: | + git clone https://${{ secrets.GIT_USER }}:${{ secrets.REGISTRY_PASS }}@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: | + cd back + go get . + + - name: build binary go + run: go build -v . -o repuestera-back + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: build proyect + run: | + cd .. && cd front + npm install + npm run build + + - name: Generar carpeta + run: mkdir -p build + + - name: Generar fecha + run: echo "BUILD_DATE=$(date +'%Y-%m-%d_%H-%M')" >> $GITHUB_ENV + + - name: Upload dist + uses: actions/upload-artifact@v3 + with: + name: Repuestera-${{ env.BUILD_DATE }} + path: dist \ No newline at end of file