-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'validate_schema' of https://github.com/aadityasinha-dot…
…com/zowe-client-python-sdk into validate_schema
- Loading branch information
Showing
21 changed files
with
1,380 additions
and
297 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 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,75 @@ | ||
name: Zowe SDK Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Update project version before publish | ||
required: false | ||
type: string | ||
dry-run: | ||
description: Dry run mode | ||
required: false | ||
type: boolean | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip twine | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Update version | ||
id: update-version | ||
shell: python | ||
run: | | ||
import os, sys | ||
sys.path.append("src") | ||
from _version import __version__ | ||
new_version = "${{ inputs.version }}" | ||
if new_version: | ||
with open("src/_version.py", 'w') as f: | ||
f.write("__version__ = \"" + new_version + "\"\n") | ||
else: | ||
new_version = __version__ | ||
with open(os.environ["GITHUB_OUTPUT"], 'a') as f: | ||
print("version=" + ("-".join(new_version.rsplit(".", 1)) if new_version.count(".") > 2 else new_version), file=f) | ||
- name: Update version (cargo) | ||
run: cargo install cargo-edit && cargo set-version ${{ steps.update-version.outputs.version }} | ||
working-directory: src/secrets | ||
|
||
- name: Update version (git) | ||
run: git add src/_version.py src/secrets/Cargo.* | ||
|
||
- name: Build wheels | ||
run: bash build.sh | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist/ | ||
|
||
- 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 }} | ||
with: | ||
dry-run: ${{ inputs.dry-run }} | ||
new-version: ${{ steps.update-version.outputs.version }} |
This file contains 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,146 @@ | ||
# This file is autogenerated by maturin v1.3.1 | ||
# To update, run | ||
# | ||
# maturin generate-ci github | ||
# | ||
name: Secrets SDK CI | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
paths: | ||
- "src/secrets/**" | ||
- ".github/workflows/secrets-sdk.yml" | ||
tags: ["**"] | ||
pull_request: | ||
paths: | ||
- "src/secrets/**" | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64, x86, aarch64, armv7, s390x] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Set environment variables | ||
run: src/secrets/scripts/configure-cross.sh ${{ matrix.target }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist | ||
sccache: "true" | ||
manylinux: auto | ||
docker-options: -e PKG_CONFIG_SYSROOT_DIR -e PKG_CONFIG_PATH | ||
working-directory: src/secrets | ||
before-script-linux: | | ||
if command -v yum &> /dev/null; then | ||
yum update -y && yum install -y libsecret-devel.${{ env.CROSS_DEB_ARCH }} pkgconfig | ||
else | ||
dpkg --add-architecture ${{ env.CROSS_DEB_ARCH }} | ||
sed -i "s/deb /deb [arch=amd64] /g" /etc/apt/sources.list | ||
echo "deb [arch=${{ env.CROSS_DEB_ARCH }}] http://ports.ubuntu.com/ubuntu-ports/ jammy main universe" >> /etc/apt/sources.list | ||
echo "deb [arch=${{ env.CROSS_DEB_ARCH }}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main universe" >> /etc/apt/sources.list | ||
apt-get update && apt-get install -y libsecret-1-dev:${{ env.CROSS_DEB_ARCH }} pkg-config | ||
fi | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: src/secrets/dist | ||
|
||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
target: [x64, x86, aarch64] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
if: ${{ matrix.target != 'aarch64' }} | ||
with: | ||
python-version: "3.10" | ||
architecture: ${{ matrix.target }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist | ||
sccache: "true" | ||
working-directory: src/secrets | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: src/secrets/dist | ||
|
||
macos: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64, aarch64] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist | ||
sccache: "true" | ||
working-directory: src/secrets | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: src/secrets/dist | ||
|
||
sdist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build sdist | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
command: sdist | ||
args: --out dist | ||
working-directory: src/secrets | ||
- name: Upload sdist | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: src/secrets/dist | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
needs: [linux, windows, macos, sdist] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
- name: Publish to PyPI | ||
uses: PyO3/maturin-action@v1 | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_ROBOT_TOKEN }} | ||
with: | ||
command: upload | ||
args: --non-interactive --skip-existing * |
This file contains 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
Oops, something went wrong.