Skip to content

Commit

Permalink
Revert "chore: Update CI workflow with versioning and publishing step…
Browse files Browse the repository at this point in the history
…s that"

This reverts commit b160fe65180945ec5862acb0854c907c06b3435d.
  • Loading branch information
oliverswitzer committed Nov 26, 2024
1 parent c731f41 commit c623665
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Calculate semantic version
id: versioning
uses: bitshifted/[email protected]
with:
main_branch: main
create_tag: false
tag_prefix: 'v'

- name: Update version in mix.exs
env:
RELEASE_VERSION: ${{ steps.versioning.outputs.version-string }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sed -i "s/version: \".*\"/version: \"${RELEASE_VERSION#v}\"/" mix.exs
git add mix.exs
git commit -m "chore: Bump version to ${RELEASE_VERSION}"
git push
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.versioning.outputs.version-string }}
git tag $VERSION
git push origin $VERSION
gh release create $VERSION \
--title "Release $VERSION" \
--generate-notes
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
Expand Down
10 changes: 1 addition & 9 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule ShortcutApiEx.MixProject do
def project do
[
app: :shortcut_api_ex,
version: version(),
version: "0.1.0",
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down Expand Up @@ -56,14 +56,6 @@ defmodule ShortcutApiEx.MixProject do
]
end

# Get version from git tags or default to 0.1.0
defp version do
case System.get_env("RELEASE_VERSION") do
nil -> "0.1.0"
v -> String.replace_prefix(v, "v", "")
end
end

defp package do
[
name: "shortcut_api_ex",
Expand Down

0 comments on commit c623665

Please sign in to comment.