1 parent 04d4baa commit 68cd1aeCopy full SHA for 68cd1ae
1 file changed
.github/workflows/release.yml
@@ -52,6 +52,23 @@ jobs:
52
- name: Install Elixir dependencies
53
run: mix deps.get
54
55
+ - name: Validate tag, mix.exs version, and changelog version
56
+ env:
57
+ TAG_NAME: ${{ github.ref_name }}
58
+ run: |
59
+ tag_version="${TAG_NAME#v}"
60
+ mix_version=$(mix run -e 'IO.write(Mix.Project.config()[:version])')
61
+
62
+ if [ "$tag_version" != "$mix_version" ]; then
63
+ echo "Tag version $tag_version does not match mix.exs version $mix_version"
64
+ exit 1
65
+ fi
66
67
+ if ! grep -q "^## \[$tag_version\]" CHANGELOG.md; then
68
+ echo "CHANGELOG.md does not contain a section for version $tag_version"
69
70
71
72
- name: Check formatting
73
run: mix format --check-formatted
74
0 commit comments