-
Notifications
You must be signed in to change notification settings - Fork 77
chore: fixes for automatic release of NodeJS and Python enablers #4501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
11effe3
try fix enablers node and python release
ed07322
checkout
3c0c652
attempt at split the actions
18a97e6
fix path
3084dac
[skip ci] Update version
zowe-robot 0a6a2fc
use same python version
c7a48c4
fix input property
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Release NodeJS Enabler | ||
| description: Release NodeJS Enabler to NPM Registry | ||
| inputs: | ||
| version: | ||
| description: Version to be released | ||
| required: false | ||
| default: "" | ||
| scope: | ||
| description: Automatic increment of the semver (patch, minor, major) unless specific version is provided | ||
| required: false | ||
| default: patch | ||
| npm-token: | ||
| description: NPM Registry publishing token | ||
| required: true | ||
| default: "" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
|
|
||
| - name: Update version manually | ||
| if: inputs.version != '' | ||
| shell: bash | ||
| run: | | ||
| cd onboarding-enabler-nodejs | ||
| sed -i.bak "s/\"version\": \".*\"/\"version\": \"$NEW_VERSION\"/" package.json | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
|
|
||
| - name: Release to NPM automatic | ||
| shell: bash | ||
| run: | | ||
| cd onboarding-enabler-nodejs | ||
| echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
| npm version ${{ inputs.scope }} | ||
| npm publish --access public | ||
| git add package.json | ||
| git add package-lock.json | ||
| git commit -m "[skip ci] Update version" | ||
| git push --no-verify | ||
| cd .. | ||
| env: | ||
| NPM_TOKEN: ${{ inputs.npm-token }} | ||
|
|
||
| - uses: ./.github/actions/teardown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| name: Release Python Enabler | ||
| description: Release Python Enabler | ||
| inputs: | ||
| version: | ||
| description: Version to be released | ||
| required: false | ||
| default: "" | ||
| dry-run: | ||
| description: Dry run python release | ||
| required: false | ||
| default: "false" | ||
| zowe-robot-user: | ||
| description: Zowe Robot User | ||
| required: true | ||
| default: "" | ||
| zowe-robot-email: | ||
| description: Zowe Robot Email | ||
| required: true | ||
| default: "" | ||
| zowe-robot-token: | ||
| description: Zowe Robot Password | ||
| required: true | ||
| default: "" | ||
| github-token: | ||
| description: Github token | ||
| required: true | ||
| default: "" | ||
| twine-password: | ||
| description: Twine password | ||
| required: true | ||
| default: "" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.14" | ||
|
|
||
| - name: Install Dependencies | ||
| shell: bash | ||
| run: | | ||
| cd onboarding-enabler-python | ||
| python -m venv venv | ||
| source venv/bin/activate | ||
| python -m pip install --upgrade pip setuptools wheel twine build | ||
| if [ -f Pipfile.lock ]; then | ||
| pip install pipenv | ||
| pipenv install --deploy --ignore-pipfile | ||
| fi | ||
|
|
||
| - name: Build Python Package | ||
| shell: bash | ||
| run: | | ||
| export SETUPTOOLS_SCM_PRETEND_VERSION=${{ inputs.version }} | ||
| ./gradlew onboarding-enabler-python:buildPython | ||
|
|
||
| - name: Upload wheels | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: wheels | ||
| path: onboarding-enabler-python/dist/ | ||
|
|
||
| - name: Install twine globally | ||
| shell: bash | ||
| run: python -m pip install --upgrade twine | ||
|
|
||
| - uses: zowe-actions/octorelease@v1 | ||
| env: | ||
| GIT_COMMITTER_NAME: ${{ inputs.zowe-robot-user }} | ||
| GIT_COMMITTER_EMAIL: ${{ inputs.zowe-robot-email }} | ||
| GIT_CREDENTIALS: x-access-token:${{ inputs.zowe-robot-token }} | ||
| GITHUB_TOKEN: ${{ inputs.github-token }} | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ inputs.twine-password }} | ||
| with: | ||
| working-dir: onboarding-enabler-python | ||
| dry-run: ${{ inputs.dry-run }} | ||
| new-version: ${{ steps.update-version.outputs.version }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,4 +29,4 @@ yarl = ">=1.20.0" | |
| [dev-packages] | ||
|
|
||
| [requires] | ||
| python_version = "3.12" | ||
| python_version = "3.14" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.