Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/actions/release-nodejs-enabler/action.yml
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
80 changes: 80 additions & 0 deletions .github/actions/release-python-enabler/action.yml
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-password:
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
Comment thread
pablocarle marked this conversation as resolved.

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: onboarding-enabler-python/dist/

- name: Install twine globally
shell: bash
run: python3 -m pip install --upgrade twine
Comment thread
pablocarle marked this conversation as resolved.
Outdated

- 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 }}
90 changes: 15 additions & 75 deletions .github/workflows/automated-release-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ on:
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 40
if: inputs.enablerType == 'node'

timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -49,84 +47,26 @@ jobs:
- name: Set name
run: git config user.name "Zowe Robot"

- name: Update version manually
if: github.event.inputs.version != ''
run: |
cd onboarding-enabler-nodejs
sed -i.bak "s/\"version\": \".*\"/\"version\": \"$NEW_VERSION\"/" package.json
env:
NEW_VERSION: ${{ github.event.inputs.version }}

- name: Release to NPM automatic
shell: bash
run: |
cd onboarding-enabler-nodejs
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
npm version ${{ github.event.inputs.scope || env.DEFAULT_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:
DEFAULT_SCOPE: 'patch'
NPM_TOKEN: ${{ secrets.NPM_PUBLIC_TOKEN }}

- uses: ./.github/actions/teardown

release-python-enabler:
runs-on: ubuntu-latest
timeout-minutes: 40
needs: release
if: inputs.enablerType == 'python'

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.ZOWE_ROBOT_TOKEN }}

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install Dependencies
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
run: |
export SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.version }}
./gradlew onboarding-enabler-python:buildPython

- name: Upload wheels
uses: actions/upload-artifact@v4
- name: Release NodeJS enabler
if: ${{ inputs.enablerType == 'node' }}
uses: ./.github/actions/release-nodejs-enabler
with:
name: wheels
path: onboarding-enabler-python/dist/

- name: Install twine globally
run: python3 -m pip install --upgrade twine
version: ${{ github.event.inputs.version }}
npm-token: ${{ secrets.NPM_PUBLIC_TOKEN }}

- uses: zowe-actions/octorelease@v1
env:
GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }}
GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }}
GIT_CREDENTIALS: x-access-token:${{ secrets.ZOWE_ROBOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_ROBOT_TOKEN }}
- name: Release Python enabler
if: ${{ inputs.enablerType == 'python' }}
uses: ./.github/actions/release-python-enabler
with:
working-dir: onboarding-enabler-python
dry-run: ${{ inputs.dry-run }}
new-version: ${{ steps.update-version.outputs.version }}
version: ${{ github.event.inputs.version }}
zowe-robot-user: ${{ secrets.ZOWE_ROBOT_USER }}
zowe-robot-email: ${{ secrets.ZOWE_ROBOT_EMAIL }}
zowe-robot-token: x-access-token:${{ secrets.ZOWE_ROBOT_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
twine-password: ${{ secrets.PYPI_ROBOT_TOKEN }}
4 changes: 2 additions & 2 deletions onboarding-enabler-nodejs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion onboarding-enabler-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zowe/apiml-onboarding-enabler-nodejs",
"version": "3.2.5",
"version": "3.2.6",
"description": "NodeJS enabler for Zowe API Mediation Layer",
"type": "module",
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion onboarding-enabler-python/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ yarl = ">=1.20.0"
[dev-packages]

[requires]
python_version = "3.12"
python_version = "3.14"
Loading