Private
Public Access
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
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 |