ok-ready-go/.drone.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

2023-02-16 11:47:48 +01:00
kind: pipeline
type: exec
2023-02-16 11:58:04 +01:00
name: build-receiver-windows
2023-02-16 11:47:48 +01:00
platform:
os: windows
2023-02-16 11:58:32 +01:00
arch: amd64
2023-02-16 11:47:48 +01:00
steps:
2023-02-16 12:53:36 +01:00
- name: build
2023-02-16 12:09:56 +01:00
environment:
RUSTFLAGS: '-C target-feature=+crt-static'
2023-02-16 11:47:48 +01:00
commands:
2023-02-16 12:33:03 +01:00
- whoami
2023-02-16 12:23:58 +01:00
- cd receiver
2023-02-16 12:25:46 +01:00
- C:\Users\doria\.cargo\bin\rustup.exe default stable
2023-02-16 12:27:33 +01:00
- C:\Users\doria\.cargo\bin\cargo.exe build --release --target x86_64-pc-windows-msvc
2023-02-16 11:47:48 +01:00
2023-02-16 12:53:36 +01:00
- name: upload
environment:
GITEA_USER:
from_secret: gitea-user
GITEA_TOKEN:
from_secret: gitea-token
commands:
2023-02-16 13:38:02 +01:00
- '& "C:\Program Files\Git\mingw64\bin\curl.exe" --user $${env:GITEA_USER}:$${env:GITEA_TOKEN} --upload-file receiver/target/x86_64-pc-windows-msvc/release/receiver.exe https://itsblue.dev/api/packages/dorian/generic/ok-ready-go/$${env:DRONE_COMMIT_SHA}/receiver-windows.exe'
2023-02-16 11:47:48 +01:00
trigger:
branch:
2023-02-16 20:51:34 +01:00
- main
---
kind: pipeline
2023-02-16 21:55:06 +01:00
name: build-and-deploy-web
2023-02-16 20:51:34 +01:00
steps:
- name: build-crypto-helper-web
2023-02-16 21:55:06 +01:00
image: itsblue.dev/plugins/wasm-pack
2023-02-16 20:51:34 +01:00
commands:
- cd crypto_helper
2023-02-16 22:04:21 +01:00
- wasm-pack build --target no-modules
2023-02-16 20:51:34 +01:00
- mkdir -p ../web/lib
- cp pkg/crypto_helper_bg.wasm ../web/lib
- cp pkg/crypto_helper.js ../web/lib
- name: publish
image: itsblue.dev/plugins/codeberg-pages-deploy
settings:
2023-02-16 21:58:56 +01:00
folder: web
2023-02-16 20:51:34 +01:00
ssh_key:
from_secret: gitea-ssh-key