Skip to content

chore(release): 4.0.1 release notes #190

chore(release): 4.0.1 release notes

chore(release): 4.0.1 release notes #190

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
verify:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore') && !startsWith(github.ref, 'refs/tags/v')"
strategy:
matrix:
python-version: [3.9, "3.10", 3.11]
steps:
- uses: actions/checkout@v1
- name: setting up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: make setup
- name: linting
run: make lint
test:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore') && !startsWith(github.ref, 'refs/tags/v')"
strategy:
max-parallel: 1
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: setup extensions
uses: actions/checkout@v1
- name: setting up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: make setup
- name: running unit tests
run: tox
- name: publishing code coverage report to codeclimate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
build/publishCodeCoverage.sh
- name: running integration tests
env:
SCC_ENV: ${{ secrets.SCC_ENV }}
SECURITY_AND_COMPLIANCE_CENTER_API_IAM_PROFILE_ID: ${{ secrets.SCC_IAM_PROFILE_ID }}
run: build/testScript.sh
release:
runs-on: ubuntu-latest
needs: [verify, test]
if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && !startsWith(github.event.head_commit.message, 'chore')"
steps:
- name: setup extensions
uses: actions/checkout@v1
- name: setup nodejs
uses: actions/setup-node@v2
with:
node-version: '20'
- name: release using semantic-release
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
GIT_AUTHOR_NAME: scccomm
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: scccomm
GIT_COMMITTER_EMAIL: [email protected]
run: |
pip install --user bumpversion
npm install @semantic-release/changelog
npm install @semantic-release/exec
npm install @semantic-release/git
npm install @semantic-release/github
rm -rf package.json
rm -rf package-lock.json
npx semantic-release
publish:
runs-on: ubuntu-latest
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')"
steps:
- name: setup extensions
uses: actions/checkout@v1
- name: install build module
run: |
python -m pip install --upgrade pip
pip install build
- name: build project
run: python -m build
- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
password: ${{ secrets.PYPI_PASSWORD }}
repository_url: https://upload.pypi.org/legacy/
documentation:
runs-on: ubuntu-latest
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')"
steps:
- name: setup extensions
uses: actions/checkout@v1
- name: install pdoc
run: pip install pdoc
- name: generate pydoc
run: |
pip install -e .
pdoc ibm_scc -o html
- name: deploy python to gh-pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "sccdeveloper"
git config --global user.password "${{ secrets.ADMIN_TOKEN }}"
cd v4/dist
git init
git add .
git commit -m "Deploy to GitHub pages"
git branch -m gh-pages
git remote add origin https://github.com/IBM/scc-python-sdk
git push -f origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
GIT_AUTHOR_NAME: sccdeveloper
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: sccdeveloper
GIT_COMMITTER_EMAIL: [email protected]