Skip to content

Commit 37cad24

Browse files
temp change to release pypi
1 parent ca93afd commit 37cad24

File tree

1 file changed

+117
-117
lines changed

1 file changed

+117
-117
lines changed

.github/workflows/_release.yml

Lines changed: 117 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525

2626
jobs:
2727
build:
28-
if: github.ref == 'refs/heads/main'
28+
# if: github.ref == 'refs/heads/main'
2929
runs-on: ubuntu-latest
3030

3131
outputs:
@@ -61,126 +61,126 @@ jobs:
6161
echo pkg-name="$(poetry version | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
6262
echo version="$(poetry version --short)" >> $GITHUB_OUTPUT
6363
64-
test-pypi-publish:
65-
needs: build
66-
runs-on: ubuntu-latest
67-
environment:
68-
name: testpypi
69-
url: https://test.pypi.org/project/${{ needs.build.outputs.pkg-name }}/
70-
steps:
71-
- name: Download build artifacts
72-
uses: actions/download-artifact@v4
73-
with:
74-
name: dist
75-
path: ${{ inputs.working-directory }}/dist/
76-
77-
- name: Set up Python
78-
uses: actions/setup-python@v5
79-
with:
80-
python-version: '3.x'
81-
82-
- name: Publish distribution 📦 to TestPyPI
83-
env:
84-
TWINE_USERNAME: __token__
85-
TWINE_PASSWORD: ${{ secrets.GH_LC_OCI_TESTPYPI_TOKEN }}
86-
run: |
87-
pip install twine
88-
twine upload -r testpypi ${{ inputs.working-directory }}/dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD --verbose
89-
90-
pre-release-checks:
91-
needs:
92-
- build
93-
- test-pypi-publish
94-
runs-on: ubuntu-latest
95-
steps:
96-
- uses: actions/checkout@v4
97-
98-
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
99-
uses: "./.github/actions/poetry_setup"
100-
with:
101-
python-version: ${{ env.PYTHON_VERSION }}
102-
poetry-version: ${{ env.POETRY_VERSION }}
103-
working-directory: ${{ inputs.working-directory }}
104-
105-
- name: Import published package
106-
shell: bash
107-
working-directory: ${{ inputs.working-directory }}
108-
env:
109-
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
110-
VERSION: ${{ needs.build.outputs.version }}
111-
# Here we use:
112-
# - The default regular PyPI index as the *primary* index, meaning
113-
# that it takes priority (https://pypi.org/simple)
114-
# - The test PyPI index as an extra index, so that any dependencies that
115-
# are not found on test PyPI can be resolved and installed anyway.
116-
# (https://test.pypi.org/simple). This will include the PKG_NAME==VERSION
117-
# package because VERSION will not have been uploaded to regular PyPI yet.
118-
# - attempt install again after 5 seconds if it fails because there is
119-
# sometimes a delay in availability on test pypi
120-
run: |
121-
poetry run pip install \
122-
--extra-index-url https://test.pypi.org/simple/ \
123-
"$PKG_NAME==$VERSION" || \
124-
( \
125-
sleep 5 && \
126-
poetry run pip install \
127-
--extra-index-url https://test.pypi.org/simple/ \
128-
"$PKG_NAME==$VERSION" \
129-
)
130-
131-
# Replace all dashes in the package name with underscores,
132-
# since that's how Python imports packages with dashes in the name.
133-
IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
134-
135-
poetry run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
136-
137-
- name: Import test dependencies
138-
run: poetry install --with test,test_integration
139-
working-directory: ${{ inputs.working-directory }}
140-
141-
# Overwrite the local version of the package with the test PyPI version.
142-
- name: Import published package (again)
143-
working-directory: ${{ inputs.working-directory }}
144-
shell: bash
145-
env:
146-
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
147-
VERSION: ${{ needs.build.outputs.version }}
148-
run: |
149-
poetry run pip install \
150-
--extra-index-url https://test.pypi.org/simple/ \
151-
"$PKG_NAME==$VERSION"
152-
153-
- name: Run unit tests
154-
run: make tests
155-
working-directory: ${{ inputs.working-directory }}
156-
157-
- name: Run integration tests
158-
run: make integration_tests
159-
working-directory: ${{ inputs.working-directory }}
160-
161-
- name: Get minimum versions
162-
working-directory: ${{ inputs.working-directory }}
163-
id: min-version
164-
run: |
165-
poetry run pip install packaging
166-
min_versions="$(poetry run python $GITHUB_WORKSPACE/.github/scripts/get_min_versions.py pyproject.toml)"
167-
echo "min-versions=$min_versions" >> "$GITHUB_OUTPUT"
168-
echo "min-versions=$min_versions"
169-
170-
- name: Run unit tests with minimum dependency versions
171-
if: ${{ steps.min-version.outputs.min-versions != '' }}
172-
env:
173-
MIN_VERSIONS: ${{ steps.min-version.outputs.min-versions }}
174-
run: |
175-
poetry run pip install $MIN_VERSIONS
176-
make tests
177-
working-directory: ${{ inputs.working-directory }}
64+
# test-pypi-publish:
65+
# needs: build
66+
# runs-on: ubuntu-latest
67+
# environment:
68+
# name: testpypi
69+
# url: https://test.pypi.org/project/${{ needs.build.outputs.pkg-name }}/
70+
# steps:
71+
# - name: Download build artifacts
72+
# uses: actions/download-artifact@v4
73+
# with:
74+
# name: dist
75+
# path: ${{ inputs.working-directory }}/dist/
76+
77+
# - name: Set up Python
78+
# uses: actions/setup-python@v5
79+
# with:
80+
# python-version: '3.x'
81+
82+
# - name: Publish distribution 📦 to TestPyPI
83+
# env:
84+
# TWINE_USERNAME: __token__
85+
# TWINE_PASSWORD: ${{ secrets.GH_LC_OCI_TESTPYPI_TOKEN }}
86+
# run: |
87+
# pip install twine
88+
# twine upload -r testpypi ${{ inputs.working-directory }}/dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD --verbose
89+
90+
# pre-release-checks:
91+
# needs:
92+
# - build
93+
# - test-pypi-publish
94+
# runs-on: ubuntu-latest
95+
# steps:
96+
# - uses: actions/checkout@v4
97+
98+
# - name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
99+
# uses: "./.github/actions/poetry_setup"
100+
# with:
101+
# python-version: ${{ env.PYTHON_VERSION }}
102+
# poetry-version: ${{ env.POETRY_VERSION }}
103+
# working-directory: ${{ inputs.working-directory }}
104+
105+
# - name: Import published package
106+
# shell: bash
107+
# working-directory: ${{ inputs.working-directory }}
108+
# env:
109+
# PKG_NAME: ${{ needs.build.outputs.pkg-name }}
110+
# VERSION: ${{ needs.build.outputs.version }}
111+
# # Here we use:
112+
# # - The default regular PyPI index as the *primary* index, meaning
113+
# # that it takes priority (https://pypi.org/simple)
114+
# # - The test PyPI index as an extra index, so that any dependencies that
115+
# # are not found on test PyPI can be resolved and installed anyway.
116+
# # (https://test.pypi.org/simple). This will include the PKG_NAME==VERSION
117+
# # package because VERSION will not have been uploaded to regular PyPI yet.
118+
# # - attempt install again after 5 seconds if it fails because there is
119+
# # sometimes a delay in availability on test pypi
120+
# run: |
121+
# poetry run pip install \
122+
# --extra-index-url https://test.pypi.org/simple/ \
123+
# "$PKG_NAME==$VERSION" || \
124+
# ( \
125+
# sleep 5 && \
126+
# poetry run pip install \
127+
# --extra-index-url https://test.pypi.org/simple/ \
128+
# "$PKG_NAME==$VERSION" \
129+
# )
130+
131+
# # Replace all dashes in the package name with underscores,
132+
# # since that's how Python imports packages with dashes in the name.
133+
# IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
134+
135+
# poetry run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
136+
137+
# - name: Import test dependencies
138+
# run: poetry install --with test,test_integration
139+
# working-directory: ${{ inputs.working-directory }}
140+
141+
# # Overwrite the local version of the package with the test PyPI version.
142+
# - name: Import published package (again)
143+
# working-directory: ${{ inputs.working-directory }}
144+
# shell: bash
145+
# env:
146+
# PKG_NAME: ${{ needs.build.outputs.pkg-name }}
147+
# VERSION: ${{ needs.build.outputs.version }}
148+
# run: |
149+
# poetry run pip install \
150+
# --extra-index-url https://test.pypi.org/simple/ \
151+
# "$PKG_NAME==$VERSION"
152+
153+
# - name: Run unit tests
154+
# run: make tests
155+
# working-directory: ${{ inputs.working-directory }}
156+
157+
# - name: Run integration tests
158+
# run: make integration_tests
159+
# working-directory: ${{ inputs.working-directory }}
160+
161+
# - name: Get minimum versions
162+
# working-directory: ${{ inputs.working-directory }}
163+
# id: min-version
164+
# run: |
165+
# poetry run pip install packaging
166+
# min_versions="$(poetry run python $GITHUB_WORKSPACE/.github/scripts/get_min_versions.py pyproject.toml)"
167+
# echo "min-versions=$min_versions" >> "$GITHUB_OUTPUT"
168+
# echo "min-versions=$min_versions"
169+
170+
# - name: Run unit tests with minimum dependency versions
171+
# if: ${{ steps.min-version.outputs.min-versions != '' }}
172+
# env:
173+
# MIN_VERSIONS: ${{ steps.min-version.outputs.min-versions }}
174+
# run: |
175+
# poetry run pip install $MIN_VERSIONS
176+
# make tests
177+
# working-directory: ${{ inputs.working-directory }}
178178

179179
publish:
180180
needs:
181181
- build
182-
- test-pypi-publish
183-
- pre-release-checks
182+
# - test-pypi-publish
183+
# - pre-release-checks
184184
runs-on: ubuntu-latest
185185
environment:
186186
name: pypi

0 commit comments

Comments
 (0)