Skip to content

Commit

Permalink
Moved tag release step out from CI to CD
Browse files Browse the repository at this point in the history
  • Loading branch information
GPrimola committed Mar 2, 2024
1 parent 259cfe1 commit 31fec52
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,25 @@ jobs:
commit_message: Updated README.md and mix.exs to version $(cat version).


tag_release:
runs-on: ubuntu-20.04
needs: update_version

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_ACTIONS_USER }}
steps:
- uses: actions/checkout@v3
- name: Tag Release
run: |
git config user.name Lucasbot
git config user.email [email protected]
if git tag releases/$(cat version); then
git push origin releases/$(cat version) -f
else
echo "Version already exists."
fi
publish_package:
runs-on: ubuntu-20.04
needs: update_version
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/master-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,3 @@ jobs:

- name: Publish Coverage
run: mix coveralls.github


tag_release:
runs-on: ubuntu-20.04
needs: coverage

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_ACTIONS_USER }}
steps:
- uses: actions/checkout@v3
- name: Tag Release
run: |
git config user.name Lucasbot
git config user.email [email protected]
if git tag releases/$(cat version); then
git push origin releases/$(cat version) -f
else
echo "Version already exists."
fi
2 changes: 1 addition & 1 deletion scripts/update_version.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule UpdateVersion do
@version_file "./version"
@version_file "./VERSION"
@mix_exs_file "./mix.exs"
@readme_file "./README.md"
@mix_version_regex ~r/@version \"(?<version>.*)\"/
Expand Down

0 comments on commit 31fec52

Please sign in to comment.