-
Notifications
You must be signed in to change notification settings - Fork 8
36 lines (33 loc) · 1.05 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
)"