Add binary building #151
1 changed files with 43 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
|
# Build and test
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn install --frozen-lockfile
|
- yarn install --frozen-lockfile
|
||||||
|
@ -21,6 +22,48 @@ steps:
|
||||||
when:
|
when:
|
||||||
event: [ push, pull_request ]
|
event: [ push, pull_request ]
|
||||||
branch: [ hotfix/*, feature/*, renovate/*, develop, main ]
|
branch: [ hotfix/*, feature/*, renovate/*, develop, main ]
|
||||||
|
|
||||||
|
# Package production build
|
||||||
|
package_prod:
|
||||||
|
image: node
|
||||||
|
commands:
|
||||||
|
- yarn package
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
branch: main
|
||||||
|
rsync_prod:
|
||||||
|
image: alpine
|
||||||
|
secrets: [ ssh_key ]
|
||||||
|
commands:
|
||||||
|
- apk add rsync openssh-client
|
||||||
|
- eval `ssh-agent -s`
|
||||||
|
- echo "$SSH_KEY" | tr -d '\r' | ssh-add -
|
||||||
|
- rsync -e "ssh -o StrictHostKeyChecking=no" -r ./bin vylpes@192.168.68.120:/home/vylpes/apps/random-bunny/random-bunny_prod
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
# Package stage build
|
||||||
|
package_stage:
|
||||||
|
image: node
|
||||||
|
commands:
|
||||||
|
- yarn package
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: develop
|
||||||
|
rsync_stage:
|
||||||
|
image: alpine
|
||||||
|
secrets: [ ssh_key ]
|
||||||
|
commands:
|
||||||
|
- apk add rsync openssh-client
|
||||||
|
- eval `ssh-agent -s`
|
||||||
|
- echo "$SSH_KEY" | tr -d '\r' | ssh-add -
|
||||||
|
- rsync -e "ssh -o StrictHostKeyChecking=no" -r ./bin vylpes@192.168.68.120:/home/vylpes/apps/random-bunny/random-bunny_stage
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: develop
|
||||||
|
|
||||||
|
# Publish to NPM
|
||||||
publish:
|
publish:
|
||||||
image: plugins/npm
|
image: plugins/npm
|
||||||
settings:
|
settings:
|
||||||
|
|
Loading…
Reference in a new issue