c411dd2e998b711aa166102934299d642925e4c6
[akkoma] / .woodpecker / .release.yml
1 matrix:
2 docker_prefix:
3 - ""
4 - arm64v8/
5 - arm32v7/
6 tag:
7 - amd64
8 - arm64
9 - arm
10
11 include:
12 - tag: amd64
13 docker_prefix: ""
14
15 pipeline:
16 glibc:
17 when:
18 event:
19 - push
20 - tag
21 branch:
22 - develop
23 - stable
24 - refs/tags/v*
25 - refs/tags/stable-*
26 secrets:
27 - SCW_ACCESS_KEY
28 - SCW_SECRET_KEY
29 - SCW_DEFAULT_ORGANIZATION_ID
30 image: ${docker_prefix}elixir:1.13
31 environment:
32 MIX_ENV: prod
33 commands:
34 - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev
35 - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
36 - mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
37 - chmod +x scaleway-cli
38 - ./scaleway-cli object config install type=rclone
39 - echo "import Mix.Config" > config/prod.secret.exs
40 - mix local.hex --force
41 - mix local.rebar --force
42 - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
43 - export PLEROMA_BUILD_BRANCH=$BUILD_TAG
44 - mix deps.clean --all
45 - mix deps.get --only prod
46 - mkdir release
47 - mix release --path release
48 - zip akkoma-${tag}.zip -r release
49 - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}.zip
50
51 musl:
52 when:
53 event:
54 - push
55 - tag
56 branch:
57 - develop
58 - stable
59 - refs/tags/v*
60 - refs/tags/stable-*
61 secrets:
62 - SCW_ACCESS_KEY
63 - SCW_SECRET_KEY
64 - SCW_DEFAULT_ORGANIZATION_ID
65 image: ${docker_prefix}elixir:1.13-alpine
66 environment:
67 MIX_ENV: prod
68 commands:
69 - apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
70 - rm -rf release || true
71 - rm -rf _build || true
72 - rm -rf /root/.mix
73 - rm scaleway-cli || true
74 - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
75 - mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
76 - chmod +x scaleway-cli
77 - ./scaleway-cli object config install type=rclone
78
79 - mix local.hex --force
80 - mix local.rebar --force
81 - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
82 - export PLEROMA_BUILD_BRANCH=$BUILD_TAG
83 - mix deps.clean --all
84 - mix deps.get --only prod
85 - mix release --path release
86 - zip akkoma-${tag}.zip -r release
87 - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl.zip
88
89 musl1.1:
90 when:
91 event:
92 - push
93 - tag
94 branch:
95 - develop
96 - stable
97 - refs/tags/v*
98 - refs/tags/stable-*
99 secrets:
100 - SCW_ACCESS_KEY
101 - SCW_SECRET_KEY
102 - SCW_DEFAULT_ORGANIZATION_ID
103 image: voidlinux/voidlinux-musl
104 environment:
105 MIX_ENV: prod
106 commands:
107 - xbps-install -Suy || xbps-install -uy xbps
108 - xbps-install -Suy
109 - xbps-install -y git gcc musl-devel make cmake file-devel rclone wget zip libmagic elixir
110 - rm -rf release || true
111 - rm -rf _build || true
112 - rm -rf /root/.mix
113 - rm scaleway-cli || true
114 - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
115 - mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
116 - chmod +x scaleway-cli
117 - ./scaleway-cli object config install type=rclone
118
119 - mix local.hex --force
120 - mix local.rebar --force
121 - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
122 - export PLEROMA_BUILD_BRANCH=$BUILD_TAG
123 - mix deps.clean --all
124 - mix deps.get --only prod
125 - mix release --path release
126 - zip akkoma-${tag}.zip -r release
127 - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl11.zip