File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 push :
99 tags :
1010 - v[0-9]+.[0-9]+.[0-9]+*
11+ - test-v[0-9]+.[0-9]+.[0-9]+*
1112
1213env :
1314 FORCE_COLOR : 1
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/
You can’t perform that action at this time.
0 commit comments