Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a release CI workflow with a version check and prepare for release 0.7.1 #74

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

# Only run this workflow on pushed tags.
on:
push:
tags:
- '*'

permissions:
contents: read

jobs:
check-version:
name: Check ered application version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Erlang/OTP
uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2
with:
otp-version: '27.1.2'
rebar3-version: '3.23.0'
- name: Check if vsn matches pushed tag (see src/ered.app.src).
run: |
rebar3 shell --apps ered --eval "$(cat << EOF
Version = "${{ github.ref_name }}",
case application:get_key(ered, vsn) of
{ok, Version} ->
halt(0,[]);
Error ->
io:format(user, "Version check failed, got ~p while pushed tag is ~s~n",
[Error, Version]),
halt(1,[]) %% Version check failed, give exitcode 1.
end.
EOF
)"
2 changes: 1 addition & 1 deletion src/ered.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application, ered,
[{description, "Valkey Cluster client library application"},
{vsn, "0.6.0"},
{vsn, "0.7.1"},
{registered, []},
{applications,
[kernel,
Expand Down