diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 714cac0b..15a58112 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -6,6 +6,16 @@ on: - master - v1.* pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + # the python version to release the ontology with. + # Must be a version in the matrix.python-version list + RELEASE_PYTHON_VERSION: '3.10' + jobs: build: runs-on: ubuntu-latest @@ -34,12 +44,22 @@ jobs: make cat Brick.ttl - name: upload ttls - if: ${{ matrix.python-version }} == "3.10" - uses: actions/upload-artifact@v3 + id: upload-ttls + if: ${{ matrix.python-version == env.RELEASE_PYTHON_VERSION }} + uses: actions/upload-artifact@v4 with: name: Brick-ontology path: | Brick.ttl + - name: comment artifact + # if the trigger is on a pull request + if: ${{ github.event_name == 'pull_request' && matrix.python-version == env.RELEASE_PYTHON_VERSION }} + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.number }} + # in the body, make a markdown link to the steps.upload-ttls.output.artifact-url + body: | + The latest build of the Brick ontology on this PR is available [here](${{ steps.upload-ttls.outputs.artifact-url }}). - name: Run the tests # -s flag: do not capture output (avoids killing test after 10 min) run: |