1212 steps :
1313 - name : Checkout the code
1414 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
1815 - name : Set up OCaml
1916 # We can't use setup-ocaml@v3 yet because ocurl can't be installed with it for now
2017 # (curl-config issue).
@@ -24,16 +21,17 @@ jobs:
2421 opam-repositories : |
2522 opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
2623 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 .
3124 - name : Set build version
3225 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
3428 - name : Using version ${{ steps.build_version.outputs.value }}
3529 run : |
3630 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 .
3735 - name : Insert the version number
3836 run : ./ci/subst.bash "${{ steps.build_version.outputs.value }}"
3937 if : startsWith(github.ref, 'refs/tags/')
@@ -54,14 +52,12 @@ jobs:
5452 steps :
5553 - name : Checkout the code
5654 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
6055 - name : Set up Docker Buildx
6156 uses : docker/setup-buildx-action@v3
6257 - name : Set build version
6358 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
6561 - name : Using version ${{ steps.build_version.outputs.value }}
6662 run : |
6763 echo "Version number: ${{ steps.build_version.outputs.value }}"
0 commit comments