diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 49daa0d6..7f38ebc1 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -20,7 +20,7 @@ jobs: message: ${{ steps.commit_message.outputs.message }} steps: - name: Checkout the repo - uses: actions/checkout@v3 + uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # Gets the correct commit message for pull request with: ref: ${{ github.event.pull_request.head.sha }} @@ -29,11 +29,7 @@ jobs: run: | set -xe COMMIT_MSG=$(git log --no-merges -1 --oneline) - RUN="0" - if [[ "$COMMIT_MSG" == *"[wheel build]"* ]]; then - RUN="1" - fi - echo "message=$RUN" >> $GITHUB_OUTPUT + echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT echo github.ref ${{ github.ref }} trexio_ubuntu: @@ -102,7 +98,7 @@ jobs: - name: publish Python API distribution as an artifact if: >- - contains(needs.get_commit_message.outputs.message, '1') || + contains(needs.get_commit_message.outputs.message, '[wheel build]') || github.event_name == 'release' uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 with: diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index a76b866d..8e391373 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -21,7 +21,7 @@ jobs: message: ${{ steps.commit_message.outputs.message }} steps: - name: Checkout the repo - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Gets the correct commit message for pull request with: ref: ${{ github.event.pull_request.head.sha }} @@ -30,19 +30,14 @@ jobs: run: | set -xe COMMIT_MSG=$(git log --no-merges -1 --oneline) - RUN="0" - if [[ "$COMMIT_MSG" == *"[wheel build]"* ]]; then - RUN="1" - fi - echo "message=$RUN" >> $GITHUB_OUTPUT + echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT echo github.ref ${{ github.ref }} - build_linux_wheels: name: Build Linux wheels for different versions of CPython on manylinux_x86_64 needs: get_commit_message if: >- - contains(needs.get_commit_message.outputs.message, '1') || + contains(needs.get_commit_message.outputs.message, '[wheel build]') || (github.repository == 'TREX-CoE/trexio' && startsWith(github.ref, 'refs/tags/v')) runs-on: ubuntu-22.04 strategy: @@ -51,10 +46,10 @@ jobs: steps: - name: Checkout the branch - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f with: python-version: '3.10' @@ -70,7 +65,7 @@ jobs: # Conventional download-artifact action does not work for artifact produced in a different workflow, # which is the case here (TREXIO CI produced the Python API distribution tarball) - name: Download the Python API distribution tarball - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: # Specify the name of the workflow file which uploaded the tarball workflow: actions.yml @@ -94,7 +89,7 @@ jobs: working-directory: python - name: Upload produced wheels as artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: pytrexio-manylinux-${{ matrix.manylinux_tag }} path: ./python/wheelhouse/*.whl @@ -107,10 +102,10 @@ jobs: steps: - name: Checkout the branch - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f with: python-version: '3.10' @@ -118,12 +113,12 @@ jobs: run: python -m pip install -U setuptools twine - name: Download the build artifacts (wheels) of this workflow - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: path: dist - name: Download the Python API distribution tarball - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: workflow: actions.yml workflow_conclusion: success