|
1 | | -name: Build |
2 | | - |
3 | | -on: push |
4 | | - |
5 | | -jobs: |
6 | | - build: |
7 | | - name: build |
8 | | - runs-on: ubuntu-latest |
9 | | - steps: |
10 | | - - name: Checkout |
11 | | - uses: actions/checkout@v4 |
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.8 |
16 | | - uses: actions/setup-python@v4 |
17 | | - with: |
18 | | - python-version: 3.8 |
19 | | - |
20 | | - - name: Update apt repositories |
21 | | - run: sudo apt update |
22 | | - |
23 | | - - name: Install Java and Node |
24 | | - run: sudo apt-get install --yes default-jre default-jdk nodejs |
25 | | - |
26 | | - - name: Upgrade python packaging tools |
27 | | - run: python -m pip install --upgrade pip setuptools wheel |
28 | | - |
29 | | - - name: Install poetry |
30 | | - run: pip install poetry |
31 | | - |
32 | | - - name: Cache poetry packages |
33 | | - uses: actions/cache@v3 |
34 | | - with: |
35 | | - path: ~/.cache/pypoetry |
36 | | - key: ${{ runner.os }}-build-cache-poetry-packages-${{ hashFiles('**/poetry.lock') }} |
37 | | - |
38 | | - - name: Cache node modules |
39 | | - uses: actions/cache@v3 |
40 | | - with: |
41 | | - path: ~/.npm |
42 | | - key: ${{ runner.os }}-build-cache-npm-packages-${{ hashFiles('**/package-lock.json') }} |
43 | | - |
44 | | - - name: Install repo |
45 | | - run: make install |
46 | | - |
| 1 | +name: Build |
| 2 | + |
| 3 | +on: push |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + name: build |
| 8 | + runs-on: ubuntu-latest |
| 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 Java |
| 16 | + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 |
| 17 | + with: |
| 18 | + distribution: 'temurin' |
| 19 | + java-version-file: '.tool-versions' |
| 20 | + |
| 21 | + - name: Install Node |
| 22 | + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 |
| 23 | + with: |
| 24 | + node-version-file: '.tool-versions' |
| 25 | + cache: 'npm' |
| 26 | + |
| 27 | + - name: Install poetry |
| 28 | + run: pipx install poetry==$(grep '^poetry ' .tool-versions | awk '{print $2}') |
| 29 | + |
| 30 | + - name: Install Python |
| 31 | + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 32 | + with: |
| 33 | + python-version-file: '.tool-versions' |
| 34 | + cache: 'poetry' |
| 35 | + |
| 36 | + - name: Install repo |
| 37 | + run: make install |
| 38 | + |
47 | 39 | - name: Set SPEC_VERSION env var |
48 | | - run: echo ::set-env name=SPEC_VERSION::$(poetry run python scripts/calculate_version.py) |
49 | | - env: |
50 | | - ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
| 40 | + run: echo "SPEC_VERSION=$(poetry run python scripts/calculate_version.py)" >> $GITHUB_ENV |
51 | 41 |
|
52 | 42 | - name: Create release (master only) |
53 | 43 | id: create-release |
54 | 44 | if: github.ref == 'refs/heads/master' |
55 | | - uses: actions/create-release@v1 |
| 45 | + uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1 |
56 | 46 | continue-on-error: true |
57 | 47 | env: |
58 | 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
59 | 49 | with: |
60 | 50 | tag_name: ${{ env.SPEC_VERSION }} |
61 | | - release_name: ${{ env.SPEC_VERSION }} |
| 51 | + name: ${{ env.SPEC_VERSION }} |
0 commit comments