Skip to content

Skore 0.6.1

Skore 0.6.1 #62

Workflow file for this run

name: release
on:
release:
types: [released, prereleased]
jobs:
tag-restriction:
name: Tag must match semantic versioning pattern
runs-on: ubuntu-latest
steps:
- shell: bash
run: |
if ! [[ "${GITHUB_REF_NAME}" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-rc\.(1|[1-9][0-9]*))?$ ]]; then
exit -1
fi
build:
name: Build package distributions
runs-on: ubuntu-latest
permissions:
contents: read
needs: tag-restriction
steps:
- uses: actions/checkout@v4
- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build skore-ui
shell: bash
run: make build-skore-ui
- name: Override VERSION.txt with tag
run: echo "${GITHUB_REF_NAME}" > skore/VERSION.txt
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build package distributions
run: |
cd skore
python -m pip install build
python -m build
- name: Checks whether distribution’s long description will render correctly on PyPI
continue-on-error: true
run: |
python -m pip install twine
python -m twine check skore/dist/*
- name: Upload package distributions
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: skore/dist/
publish:
name: Publish package distributions to PyPI using trusted publisher
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
needs: build
steps:
- name: Download package distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verify-metadata: false
communicate:
name: Communicate on slack about the new release
runs-on: ubuntu-latest
needs: publish
continue-on-error: true
steps:
- name: Post to slack
uses: slackapi/[email protected]
with:
channel-id: "product-releases"
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.release.html_url) }}
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(format('>>> {0}', github.event.release.body)) }}
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
clean:
name: Delete package distributions artifacts
runs-on: ubuntu-latest
if: always()
needs: publish
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: python-package-distributions