@@ -3,49 +3,49 @@ name: Publish / Calculate Version
33on : push
44
55jobs :
6- build :
7- name : calculate version
8- runs-on : ubuntu-22.04
9- steps :
10- - name : Checkout
11- uses : actions/checkout@v2
12- with :
13- fetch-depth : 0 # This causes all history to be fetched, which is required for calculate-version to function
14-
15- - name : Install Python 3.13
16- uses : actions/setup-python@v5
17- with :
18- python-version : 3.13
19-
20- - name : Install poetry
21- run : pip install poetry
22-
23- - name : Cache poetry packages
24- uses : actions/cache@v4
25- id : cache
26- with :
27- path : ~/.venv
28- key : ${{ runner.os }}-utils-venv-${{ hashFiles('**/poetry.lock') }}
29-
30- - name : Install
31- run : poetry install
32- if : steps.cache.outputs.cache-hit != 'true'
33-
34- - name : Set SPEC_VERSION env var
35- run : |
36- version="$(poetry run python scripts/calculate_version.py)"
37- echo "${version}"
38- echo ::set-env name=SPEC_VERSION::${version}
39- env :
40- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
41-
42- - name : Create release (master only)
43- id : create-release
44- if : github.ref == 'refs/heads/master'
45- uses : actions/create-release@v1
46- continue-on-error : true
47- env :
48- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49- with :
50- tag_name : ${{ env.SPEC_VERSION }}
51- release_name : ${{ env.SPEC_VERSION }}
6+ build :
7+ name : calculate version
8+ runs-on : ubuntu-22.04
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
12+ with :
13+ fetch-depth : 0 # This causes all history to be fetched, which is required for calculate-version to function
14+
15+ - name : Install Python 3.13
16+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
17+ with :
18+ python-version : 3.13
19+
20+ - name : Install poetry
21+ run : pip install poetry
22+
23+ - name : Cache poetry packages
24+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
25+ id : cache
26+ with :
27+ path : ~/.venv
28+ key : ${{ runner.os }}-utils-venv-${{ hashFiles('**/poetry.lock') }}
29+
30+ - name : Install
31+ run : poetry install
32+ if : steps.cache.outputs.cache-hit != 'true'
33+
34+ - name : Set SPEC_VERSION env var
35+ run : |
36+ version="$(poetry run python scripts/calculate_version.py)"
37+ echo "${version}"
38+ echo ::set-env name=SPEC_VERSION::${version}
39+ env :
40+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
41+
42+ - name : Create release (master only)
43+ id : create-release
44+ if : github.ref == 'refs/heads/master'
45+ uses : actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
46+ continue-on-error : true
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+ with :
50+ tag_name : ${{ env.SPEC_VERSION }}
51+ release_name : ${{ env.SPEC_VERSION }}
0 commit comments