quickpeep/.ci/woodpecker/release.yml

56 lines
1.3 KiB
YAML

# Building a release
platform: linux/${ARCH}
matrix:
ARCH:
# We don't have an arm64 runner for now.
#- arm64
- amd64
.a1: &when
event: tag
tag: v*
pipeline:
buildAssets:
when: *when
image: "node:17.8.0-bullseye"
commands:
- apt-get -qq update && apt-get -yqq install python3
- cd quickpeep_static
- yarn install
- yarn build
buildRelease:
when: *when
image: "rust:1.59.0"
commands:
- apt-get -qq update && apt-get -yqq install pkg-config libssl-dev build-essential libclang-dev
- cargo install sqlx-cli --features sqlite
- "qualsuff=`echo $CI_COMMIT_TAG-$ARCH | sed s%/%-%`"
- cd quickpeep && bash dev_db.sh && cd ..
- mkdir dist
- cargo install --path quickpeep --bins --root dist
- cargo install --path quickpeep_raker --bins --root dist
- cargo install --path quickpeep_indexer --bins --root dist
- cp -r scripts dist/
- mkdir dist/static
- cp -r quickpeep_static/dist/* dist/static
- "mv dist quickpeep-$qualsuff"
- "tar Jcvf quickpeep-$qualsuff.tar.xz quickpeep-$qualsuff"
uploadRelease:
when: *when
image: plugins/gitea-release
base_url: https://bics.ga
checksum:
- sha256
files:
- "quickpeep-*.tar.xz"
secrets:
- source: gitea_token
target: plugin_api_key