acb2bf2cfff4a01690c12524ef4395703762d2ff
[akkoma] / .woodpecker / .release.yml
1 depends_on:
2 - test
3
4 when:
5 event: deployment
6
7 matrix:
8 platform:
9 - amd64
10 - arm64
11
12 platform: linux/${platform}
13
14 pipeline:
15 ${platform}-glibc:
16 group: release
17 image: elixir:1.13
18 environment:
19 MIX_ENV: prod
20 commands:
21 - apt-get update && apt-get install -y cmake libmagic-dev rclone
22 - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
23 - mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
24 - chmod +x scaleway-cli
25 - ./scaleway-cli object config install type=rclone
26 - echo "import Mix.Config" > config/prod.secret.exs
27 - mix deps.get --only prod
28 - mkdir release
29 - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH
30 - mix release --path release
31 - zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release
32 - rclone copy akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/
33
34 ${platform}-musl:
35 group: release
36 image: elixir:1.13-alpine
37 environment:
38 MIX_ENV: prod
39 commands:
40 - apk add git gcc g++ musl-dev make cmake file-dev rclone wget
41 - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
42 - mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
43 - chmod +x scaleway-cli
44 - ./scaleway-cli object config install type=rclone
45 - echo "import Mix.Config" > config/prod.secret.exs
46 - mix deps.get --only prod
47 - mkdir release
48 - export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
49 - mix release --path release
50 - zip akkoma-$CI_COMMIT_BRANCH-${platform}.zip -r release
51 - rclone copy akkoma-$CI_COMMIT_BRANCH-${platform}.zip scaleway:akkoma-updates/