when:
event:
- push
+ - tag
branch:
- develop
- stable
+ - refs/tags/v*
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- echo "import Mix.Config" > config/prod.secret.exs
- mix local.hex --force
- mix local.rebar --force
- - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH
+ - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
+ - export PLEROMA_BUILD_BRANCH=$BUILD_TAG
- mix deps.clean --all
- mix deps.get --only prod
- mkdir release
- mix release --path release
- zip akkoma-${tag}.zip -r release
- - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${tag}.zip
+ - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}.zip
musl:
when:
event:
- push
+ - tag
branch:
- develop
- stable
+ - refs/tags/v*
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- mix local.hex --force
- mix local.rebar --force
- - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH
+ - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
+ - export PLEROMA_BUILD_BRANCH=$BUILD_TAG
- mix deps.clean --all
- mix deps.get --only prod
- mix release --path release
- zip akkoma-${tag}.zip -r release
- - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${tag}-musl.zip
+ - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl.zip
musl1.1:
when:
event:
- push
+ - tag
branch:
- develop
- stable
+ - refs/tags/v*
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- mix local.hex --force
- mix local.rebar --force
- - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_BRANCH
+ - export BUILD_TAG=$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}
+ - export PLEROMA_BUILD_BRANCH=$BUILD_TAG
- mix deps.clean --all
- mix deps.get --only prod
- mix release --path release
- zip akkoma-${tag}.zip -r release
- - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$CI_COMMIT_BRANCH/akkoma-${tag}-musl11.zip
+ - rclone copyto akkoma-${tag}.zip scaleway:akkoma-updates/$BUILD_TAG/akkoma-${tag}-musl11.zip