chore(ci): move release jobs to only run on tags.
This commit is contained in:
parent
2554be837c
commit
faf84d47e6
3 changed files with 22 additions and 20 deletions
|
@ -3,7 +3,6 @@ image: elixir:latest
|
|||
stages:
|
||||
- build
|
||||
- test
|
||||
- version
|
||||
- release
|
||||
|
||||
variables:
|
||||
|
@ -27,12 +26,15 @@ build:
|
|||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
- mix deps.compile
|
||||
- mix git_ops.project_info -f dotenv > project_info.env
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/
|
||||
- deps/
|
||||
- .hex
|
||||
- .mix
|
||||
reports:
|
||||
dotenv: project_info.env
|
||||
|
||||
test:
|
||||
image: elixir:latest
|
||||
|
@ -94,7 +96,7 @@ git_ops:
|
|||
image: elixir:latest
|
||||
dependencies:
|
||||
- build
|
||||
stage: version
|
||||
stage: release
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
|
@ -118,34 +120,29 @@ git_ops:
|
|||
artifacts:
|
||||
paths:
|
||||
- artifacts/*
|
||||
- mix.exs
|
||||
- README.md
|
||||
- CHANGELOG.md
|
||||
|
||||
release-gitlab:
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
only:
|
||||
- master
|
||||
- tags
|
||||
- /^v\d+\.\d+\.\d+(-\w+)?$/
|
||||
dependencies:
|
||||
- git_ops
|
||||
- build
|
||||
script:
|
||||
- |
|
||||
source artifacts/env
|
||||
release-cli create \
|
||||
--name "Release ${APP_NAME} ${APP_VERSION}" \
|
||||
--description "./CHANGELOG.md" \
|
||||
--tag-name "v${APP_VERSION}" \
|
||||
--assets-link "{\"name\":\"${APP_NAME}-${APP_VERSION}.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/${APP_NAME}/${APP_VERSION}/${APP_NAME}-${APP_VERSION}.tar.gz\"}" \
|
||||
--assets-link "{\"name\":\"${APP_NAME}-${APP_VERSION}-docs.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/${APP_NAME}/${APP_VERSION}/${APP_NAME}-${APP_VERSION}-docs.tar.gz\"}"
|
||||
- release-cli create \
|
||||
--name "Release ${APP_NAME} ${APP_VERSION}" \
|
||||
--description "./CHANGELOG.md" \
|
||||
--tag-name "v${APP_VERSION}" \
|
||||
--assets-link "{\"name\":\"${APP_NAME}-${APP_VERSION}.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/${APP_NAME}/${APP_VERSION}/${APP_NAME}-${APP_VERSION}.tar.gz\"}" \
|
||||
--assets-link "{\"name\":\"${APP_NAME}-${APP_VERSION}-docs.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/${APP_NAME}/${APP_VERSION}/${APP_NAME}-${APP_VERSION}-docs.tar.gz\"}"
|
||||
|
||||
release-hex:
|
||||
image: elixir:latest
|
||||
dependencies:
|
||||
- build
|
||||
- git_ops
|
||||
stage: release
|
||||
only:
|
||||
- master
|
||||
- tags
|
||||
- /^v\d+\.\d+\.\d+(-\w+)?$/
|
||||
script:
|
||||
- mix hex.publish --yes
|
||||
|
|
7
mix.exs
7
mix.exs
|
@ -50,7 +50,12 @@ defmodule Wafer.MixProject do
|
|||
{:earmark, ">= 0.0.0", only: ~w[dev test]a},
|
||||
{:elixir_ale, "~> 1.2", optional: true},
|
||||
{:ex_doc, ">= 0.0.0", only: ~w[dev test]a},
|
||||
{:git_ops, "~> 2.2", only: ~w[dev test]a, runtime: false},
|
||||
# {:git_ops, "~> 2.2", only: ~w[dev test]a, runtime: false},
|
||||
{:git_ops,
|
||||
git: "https://github.com/jimsynz/git_ops",
|
||||
branch: "add-dotenv-format",
|
||||
only: ~w[dev test]a,
|
||||
runtime: false},
|
||||
{:mimic, "~> 1.1", only: :test}
|
||||
]
|
||||
end
|
||||
|
|
2
mix.lock
2
mix.lock
|
@ -11,7 +11,7 @@
|
|||
"ex_doc": {:hex, :ex_doc, "0.23.0", "a069bc9b0bf8efe323ecde8c0d62afc13d308b1fa3d228b65bca5cf8703a529d", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "f5e2c4702468b2fd11b10d39416ddadd2fcdd173ba2a0285ebd92c39827a5a16"},
|
||||
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
|
||||
"git_cli": {:hex, :git_cli, "0.3.0", "a5422f9b95c99483385b976f5d43f7e8233283a47cda13533d7c16131cb14df5", [:mix], [], "hexpm", "78cb952f4c86a41f4d3511f1d3ecb28edb268e3a7df278de2faa1bd4672eaf9b"},
|
||||
"git_ops": {:hex, :git_ops, "2.2.0", "27a2e38cf5d71ebdd287c90006c0a41dee8b2309369f8a97d3f6e3a2c279fe2f", [:mix], [{:git_cli, "~> 0.2", [hex: :git_cli, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "6fa296bb9c2d737efba7ef52f3e6cdfafeb6a599db97f65c29b56e09f29b67e0"},
|
||||
"git_ops": {:git, "https://github.com/jimsynz/git_ops", "c160d55e01c2d133492965c566e2d03f71cc392c", [branch: "add-dotenv-format"]},
|
||||
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
|
||||
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
|
||||
"makeup_elixir": {:hex, :makeup_elixir, "0.15.0", "98312c9f0d3730fde4049985a1105da5155bfe5c11e47bdc7406d88e01e4219b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "75ffa34ab1056b7e24844c90bfc62aaf6f3a37a15faa76b07bc5eba27e4a8b4a"},
|
||||
|
|
Loading…
Reference in a new issue