2023-02-17 19:39:25 +01:00
|
|
|
kind: pipeline
|
|
|
|
type: exec
|
|
|
|
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-17 20:50:41 +01:00
|
|
|
RUSTUP_HOME: 'C:\Users\drone\.rustup'
|
2023-02-16 11:47:48 +01:00
|
|
|
commands:
|
2023-02-16 12:33:03 +01:00
|
|
|
- whoami
|
2023-02-17 20:44:31 +01:00
|
|
|
- 'Get-ChildItem Env:'
|
2023-02-16 12:23:58 +01:00
|
|
|
- cd receiver
|
2023-02-17 20:51:24 +01:00
|
|
|
- 'C:\Users\drone\.cargo\bin\cargo.exe build --release --target x86_64-pc-windows-msvc'
|
2023-02-16 11:47:48 +01:00
|
|
|
|
2023-02-17 19:16:03 +01:00
|
|
|
- name: sign
|
|
|
|
commands:
|
2023-02-17 20:23:56 +01:00
|
|
|
- 'C:\Program` Files` `(x86`)\Windows` Kits\10\bin\10.0.22621.0\x86\signtool.exe sign /n Itsblue` Development /t http://timestamp.digicert.com /fd SHA256 .\receiver\target\x86_64-pc-windows-msvc\release\receiver.exe'
|
2023-02-17 19:16:03 +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-17 20:23:56 +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-17 20:44:31 +01:00
|
|
|
#trigger:
|
|
|
|
# ref:
|
|
|
|
# - refs/tags/v*
|
2023-02-16 20:51:34 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
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:
|
2023-02-17 15:20:18 +01:00
|
|
|
from_secret: gitea-ssh-key
|
|
|
|
|
2023-02-17 16:16:23 +01:00
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
2023-02-17 16:18:14 +01:00
|
|
|
|
2023-02-17 15:20:18 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: release
|
|
|
|
depends_on:
|
|
|
|
- build-receiver-windows
|
|
|
|
- build-and-deploy-web
|
|
|
|
steps:
|
|
|
|
- name: download-receiver
|
|
|
|
image: alpine/curl
|
|
|
|
commands:
|
|
|
|
- curl https://itsblue.dev/api/packages/dorian/generic/ok-ready-go/$DRONE_COMMIT_SHA/receiver-windows.exe -o receiver-windows.exe
|
|
|
|
|
|
|
|
- name: gitea-release
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
base_url: https://itsblue.dev
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea-token
|
|
|
|
files: ./receiver-windows.exe
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|