kroz-rs/.drone.yml
Alex Page 7c93fb2bae
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is passing
Add web build and deploy to CI
2022-02-04 21:37:07 -05:00

53 lines
1.3 KiB
YAML

kind: pipeline
name: default
steps:
- name: build
image: rust
commands:
- apt-get update
- apt-get install -y libasound2-dev g++-mingw-w64-x86-64 npm
- rustup target add x86_64-pc-windows-gnu
- rustup toolchain install stable-x86_64-pc-windows-gnu
- rustup target add wasm32-unknown-unknown
- cargo build --release --verbose --all --target x86_64-unknown-linux-gnu
- cargo build --release --verbose --all --target x86_64-pc-windows-gnu
- npm install
- npm run build
- mv target/x86_64-unknown-linux-gnu/release/kroz kroz_linux_x86_64
- mv target/x86_64-pc-windows-gnu/release/kroz.exe kroz_win_x86_64.exe
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.valter.cat
api_key:
from_secret: gitea_token
files:
- kroz_linux_x86_64
- kroz_win_x86_64.exe
checksum:
- md5
- sha1
prerelease: true
when:
event:
- tag
- name: deploy
image: alpine
volumes:
- name: krozhtml
path: /html
commands:
- rm -r /html/*.wasm || true
- cp -r dist/* /html/
- chown -R 1000:1000 /html/*
when:
event:
- promote
target:
- production
volumes:
- name: krozhtml
host:
path: /home/alex/docker/kroz/files