Skip to content

Commit

Permalink
Publish on TestPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Oct 11, 2024
1 parent b439b84 commit 196f6ad
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: Release

on:
release:
types: [released, prereleased]
# on:
# release:
# types: [released, prereleased]

on: [push]

jobs:
tag-restriction:
name: Tag must match semantic versioning pattern
runs-on: ubuntu-latest
environment: release
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
# tag-restriction:
# name: Tag must match semantic versioning pattern
# runs-on: ubuntu-latest
# environment: release
# 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
Expand All @@ -36,7 +38,8 @@ jobs:
run: make build-skore-ui

- name: Override VERSION.txt with tag
run: echo "${GITHUB_REF_NAME}" > skore/VERSION.txt
# run: echo "${GITHUB_REF_NAME}" > skore/VERSION.txt
run: echo "1000.0.0" > skore/VERSION.txt

- name: Set up Python 3.12
uses: actions/setup-python@v5
Expand Down Expand Up @@ -76,10 +79,11 @@ jobs:
name: python-package-distributions
path: dist/

- name: Publish package distributions to PyPI
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verify-metadata: false
repository-url: https://test.pypi.org/legacy/

clean:
name: Delete package distributions artifacts
Expand Down

0 comments on commit 196f6ad

Please sign in to comment.