12
12
steps :
13
13
- name : Checkout the code
14
14
uses : actions/checkout@v4
15
- - name : Fetch tags
16
- if : startsWith(github.ref, 'refs/tags/') # https://github.com/actions/checkout/issues/1467
17
- run : git fetch --tags
18
15
- name : Set up OCaml
19
16
# We can't use setup-ocaml@v3 yet because ocurl can't be installed with it for now
20
17
# (curl-config issue).
@@ -24,16 +21,17 @@ jobs:
24
21
opam-repositories : |
25
22
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
26
23
default: https://github.com/ocaml/opam-repository.git
27
- - name : Pin the dependencies
28
- run : opam pin add cs_api_client.dev --no-action .
29
- - name : Install the dependencies
30
- run : opam install --deps-only --with-test .
31
24
- name : Set build version
32
25
id : build_version
33
- run : echo "value=$(git describe --always HEAD)" >> $env:GITHUB_OUTPUT
26
+ run : |
27
+ echo "value=$(bash ci/get_version.bash "${{ github.ref_type }}" "${{ github.ref_name }}")" >> $env:GITHUB_OUTPUT
34
28
- name : Using version ${{ steps.build_version.outputs.value }}
35
29
run : |
36
30
echo "Version number: ${{ steps.build_version.outputs.value }}"
31
+ - name : Pin the dependencies
32
+ run : opam pin add cs_api_client.dev --no-action .
33
+ - name : Install the dependencies
34
+ run : opam install --deps-only --with-test .
37
35
- name : Insert the version number
38
36
run : ./ci/subst.bash "${{ steps.build_version.outputs.value }}"
39
37
if : startsWith(github.ref, 'refs/tags/')
@@ -54,14 +52,12 @@ jobs:
54
52
steps :
55
53
- name : Checkout the code
56
54
uses : actions/checkout@v4
57
- - name : Fetch tags
58
- if : startsWith(github.ref, 'refs/tags/') # https://github.com/actions/checkout/issues/1467
59
- run : git fetch --tags
60
55
- name : Set up Docker Buildx
61
56
uses : docker/setup-buildx-action@v3
62
57
- name : Set build version
63
58
id : build_version
64
- run : echo "value=$(git describe --always HEAD)" >> $GITHUB_OUTPUT
59
+ run : |
60
+ echo "value=$(./ci/get_version.bash "${{ github.ref_type }}" "${{ github.ref_name }}")" >> $GITHUB_OUTPUT
65
61
- name : Using version ${{ steps.build_version.outputs.value }}
66
62
run : |
67
63
echo "Version number: ${{ steps.build_version.outputs.value }}"
0 commit comments