Skip to content

Commit 2ba3969

Browse files
committed
Cleanup pypi_registry
1 parent 76bf102 commit 2ba3969

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/actions/build-node-python/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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'

.github/actions/get-node-version/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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)) {
@@ -41,7 +43,7 @@ runs:
4143
4244
if (!requiredRange) {
4345
core.info('No node engine requirement in package.json. Returning empty.');
44-
return '';
46+
return defaultVersion;
4547
}
4648
4749
core.info(`Required Node.js range: ${requiredRange}`);

.github/actions/publish-python/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ author: datavisyn
55
inputs:
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

1916
runs:
@@ -30,6 +27,6 @@ runs:
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 }}

.github/workflows/publish-node-python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,6 @@ jobs:
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 }}

.github/workflows/publish-python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@ jobs:
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 }}

0 commit comments

Comments
 (0)