akkoma/.woodpecker/.release.yml

75 lines
2.1 KiB
YAML
Raw Normal View History

2022-06-11 10:57:12 -06:00
matrix:
docker_prefix:
- ""
- arm64v8/
- arm32v7/
tag:
- amd64
- arm64
- arm
include:
- tag: amd64
docker_prefix: ""
2022-06-10 10:40:01 -06:00
2022-06-11 10:57:12 -06:00
pipeline:
glibc:
2022-06-11 09:41:15 -06:00
when:
event:
2022-06-11 12:37:24 -06:00
- push
2022-06-11 10:42:29 -06:00
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- SCW_DEFAULT_ORGANIZATION_ID
2022-06-11 10:57:12 -06:00
image: ${docker_prefix}elixir:1.13
2022-06-10 10:40:01 -06:00
environment:
MIX_ENV: prod
commands:
2022-06-11 10:57:12 -06:00
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip
2022-06-10 10:40:01 -06:00
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
- chmod +x scaleway-cli
- ./scaleway-cli object config install type=rclone
- echo "import Mix.Config" > config/prod.secret.exs
2022-06-11 10:44:12 -06:00
- mix local.hex --force
- mix local.rebar --force
2022-06-11 11:32:10 -06:00
- mix deps.clean --all
2022-06-10 10:40:01 -06:00
- mix deps.get --only prod
- mkdir release
2022-06-11 11:48:26 -06:00
- export PLEROMA_BUILD_BRANCH=develop
2022-06-10 10:40:01 -06:00
- mix release --path release
2022-06-11 11:48:26 -06:00
- zip akkoma-${tag}.zip -r release
- rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/develop/akkoma-${tag}.zip
2022-06-11 09:41:15 -06:00
2022-06-11 10:57:12 -06:00
musl:
2022-06-11 09:41:15 -06:00
when:
event:
2022-06-11 12:37:24 -06:00
- push
2022-06-11 11:12:48 -06:00
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- SCW_DEFAULT_ORGANIZATION_ID
2022-06-11 09:41:15 -06:00
group: release
2022-06-11 10:57:12 -06:00
image: ${docker_prefix}elixir:1.13-alpine
2022-06-11 09:41:15 -06:00
environment:
MIX_ENV: prod
commands:
2022-06-11 10:57:12 -06:00
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip
2022-06-11 12:10:45 -06:00
- rm -rf release || true
- rm -rf _build || true
- rm -rf /root/.mix
2022-06-11 12:37:24 -06:00
- rm scaleway-cli || true
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
- chmod +x scaleway-cli
- ./scaleway-cli object config install type=rclone
2022-06-11 11:12:48 -06:00
- mix local.hex --force
- mix local.rebar --force
2022-06-11 11:32:10 -06:00
- mix deps.clean --all
2022-06-11 09:41:15 -06:00
- mix deps.get --only prod
- mix release --path release
2022-06-11 12:10:45 -06:00
- export PLEROMA_BUILD_BRANCH=develop
2022-06-11 11:48:26 -06:00
- zip akkoma-${tag}.zip -r release
2022-06-11 12:22:03 -06:00
- rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/develop/akkoma-${tag}-musl.zip