Skip to content

Commit 2f4ca1a

Browse files
committed
testing release on test pypi
1 parent 564067e commit 2f4ca1a

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
push:
99
tags:
1010
- v[0-9]+.[0-9]+.[0-9]+*
11+
- test-v[0-9]+.[0-9]+.[0-9]+*
1112

1213
env:
1314
FORCE_COLOR: 1
@@ -17,7 +18,7 @@ jobs:
1718
check-release-tag:
1819

1920
# Only run this job on the main repository and not on forks
20-
if: github.repository == 'aiidateam/aiida-core'
21+
# if: github.repository == 'aiidateam/aiida-core'
2122
runs-on: ubuntu-latest
2223

2324
steps:
@@ -105,9 +106,20 @@ jobs:
105106
- name: install flit
106107
run: |
107108
pip install flit~=3.4
109+
- name: Set FLIT_INDEX_URL based on tag
110+
run: |
111+
if [[ "${GITHUB_REF#refs/tags/}" == test* ]]; then
112+
echo "FLIT_INDEX_URL=https://test.pypi.org/legacy/" >> $GITHUB_ENV
113+
else
114+
echo "FLIT_INDEX_URL=https://pypi.org/legacy/" >> $GITHUB_ENV
115+
fi
116+
- name: Did it work?
117+
run: |
118+
echo $FLIT_INDEX_URL
108119
- name: Build and publish
109120
run: |
110-
flit publish
121+
echo $FLIT_INDEX_URL
111122
env:
112123
FLIT_USERNAME: __token__
113124
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}
125+
FLIT_INDEX_URL: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)