File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,8 @@ runs:
101101 steps :
102102 # Node
103103 - uses : ./tmp/github-workflows/.github/actions/get-node-version
104- if : inputs.enable_node == 'true'
104+ if : inputs.enable_node == 'true' && inputs.node_version == ''
105105 id : get-node-version
106-
107106 - name : Set up node version
108107 uses : actions/setup-node@v5
109108 if : inputs.enable_node == 'true'
Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ runs:
2525 const fs = require('fs');
2626 // Load the sandboxed semver dependency from the action's own node_modules
2727 const semver = require(path.join(process.env.GITHUB_ACTION_PATH, 'node_modules/semver'));
28+
29+ const defaultVersion = '20.9';
2830
2931 // Define the versions to check against the package.json engines field, in order of preference
3032 // See https://github.com/actions/node-versions/releases for available versions
31- const versionsToCheck = ['20.9' , '24.9'].map((v) => semver.minVersion(v).version);
33+ const versionsToCheck = [defaultVersion , '24.9'].map((v) => semver.minVersion(v).version);
3234
3335 const packageJsonPath = path.join(process.env.GITHUB_WORKSPACE, 'package.json');
3436 if (!fs.existsSync(packageJsonPath)) {
4042 const requiredRange = packageJson.engines?.node;
4143
4244 if (!requiredRange) {
43- core.info(' No node engine requirement in package.json. Returning empty.' );
44- return '' ;
45+ core.info(` No node engine requirement in package.json. Returning default version ${defaultVersion}.` );
46+ return defaultVersion ;
4547 }
4648
4749 core.info(`Required Node.js range: ${requiredRange}`);
Original file line number Diff line number Diff line change @@ -5,15 +5,12 @@ author: datavisyn
55inputs :
66 pypi_registry :
77 description : " registry where to publish python package"
8- default : " https://upload.pypi.org/legacy/"
98 required : false
109 pypi_username :
1110 description : " username for python registry"
12- default : " admin"
1311 required : true
1412 pypi_password :
1513 description : " passwort for python registry"
16- default : " admin"
1714 required : true
1815
1916runs :
3027 twine upload dist_python/*
3128 shell : bash
3229 env :
33- PYPI_REPOSITORY : ${{ inputs.pypi_registry }}
30+ PYPI_REPOSITORY : ${{ inputs.pypi_registry || 'https://upload.pypi.org/legacy/' }}
3431 TWINE_USERNAME : ${{ inputs.pypi_username }}
3532 TWINE_PASSWORD : ${{ inputs.pypi_password }}
Original file line number Diff line number Diff line change 9999 github_ro_token : ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
100100 - uses : ./tmp/github-workflows/.github/actions/publish-python
101101 with :
102+ pypi_registry : ${{ vars.PYPI_REGISTRY }}
102103 pypi_username : ${{ secrets.PYPI_USERNAME }}
103104 pypi_password : ${{ secrets.PYPI_PASSWORD }}
Original file line number Diff line number Diff line change 5656 github_ro_token : ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
5757 - uses : ./tmp/github-workflows/.github/actions/publish-python
5858 with :
59+ pypi_registry : ${{ vars.PYPI_REGISTRY }}
5960 pypi_username : ${{ secrets.PYPI_USERNAME }}
6061 pypi_password : ${{ secrets.PYPI_PASSWORD }}
You can’t perform that action at this time.
0 commit comments