MNS-2397: fix: update poetry installation method in CI workflow #573
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: push | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function | |
| - name: Install Java | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version-file: '.tool-versions' | |
| - name: Install Node | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: '.tool-versions' | |
| cache: 'npm' | |
| - name: Install poetry | |
| run: pipx install poetry==$(grep '^poetry ' .tool-versions | awk '{print $2}') | |
| - name: Install Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version-file: '.tool-versions' | |
| cache: 'poetry' | |
| - name: Install repo | |
| run: make install | |
| - name: Set SPEC_VERSION env var | |
| run: echo "SPEC_VERSION=$(poetry run python scripts/calculate_version.py)" >> $GITHUB_ENV | |
| - name: Create release (master only) | |
| id: create-release | |
| if: github.ref == 'refs/heads/master' | |
| uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1 | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ env.SPEC_VERSION }} | |
| name: ${{ env.SPEC_VERSION }} |