GoScrobble/.gitlab-ci.yml
2021-03-27 20:24:17 +13:00

50 lines
946 B
YAML

stages:
- build
- bundle
variables:
VERSION: 0.0.1
build-go:
image: golang:1.16.2
stage: build
script:
- go build -o goscrobble cmd/go-scrobble/*.go
artifacts:
expire_in: 1 day
paths:
- goscrobble
- migrations
- init
build-react:
image: node:15.12.0
stage: build
variables:
REACT_APP_API_URL: "https://goscrobble.com"
script:
- cd web
- npm install
- npm run build
artifacts:
expire_in: 1 day
paths:
- web/build
- web/public
- .env.example
bundle:
image: bash:latest
stage: bundle
variables:
GIT_STRATEGY: none
before_script:
- apk add --no-cache zip tar
script:
- zip -r goscrobble.zip web goscrobble migrations init .env.example
- tar -czf goscrobble.tar.gz web goscrobble migrations init .env.example
artifacts:
expire_in: 6 months
paths:
- goscrobble.${VERSION}.zip
- goscrobble.${VERSION}.tar.gz