Skip to content

Commit 0eaa93e

Browse files
authored
Merge pull request #54 from merative/dla-gh-actions
Dla gh actions
2 parents f2c4d91 + 3076989 commit 0eaa93e

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/build-test-deploy.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,33 @@ jobs:
7373
npm install -g @semantic-release/git
7474
npm install -g @semantic-release/github
7575
76+
- name: Get the next release from semantic release
77+
id: next_release
78+
env:
79+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
run: echo ::set-output name=NEXT_RELEASE::$(npx semantic-release --dry-run | grep -oP "Published release \K[0-9]+\.[0-9]+\.[0-9]+") #null if no published release
82+
7683
- name: Publish to git releases and tags
84+
if: ${{ steps.next_release.outputs.NEXT_RELEASE != null }}
7785
env:
7886
GH_TOKEN: ${{ secrets.GH_TOKEN }}
7987
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80-
run: npx semantic-release #--dry-run
88+
run: |
89+
echo "The next release is ${{ steps.next_release.outputs.NEXT_RELEASE }}"
90+
npx semantic-release
8191
8292
- name: Build project
93+
if: ${{ steps.next_release.outputs.NEXT_RELEASE != null }}
8394
run: |
8495
pip install -U pip
8596
pip install build
8697
python -m build
8798
8899
- name: Publish to pypi
100+
if: ${{ steps.next_release.outputs.NEXT_RELEASE != null }}
89101
uses: pypa/gh-action-pypi-publish@release/v1
90102
with:
91103
user: ${{ secrets.PYPI_USER }}
92-
password: ${{ secrets.PYPI_TOKEN }}
104+
password: ${{ secrets.PYPI_PASSWORD }}
93105
repository_url: https://upload.pypi.org/legacy/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This Python SDK allows developers to programmatically interact with the followin
2121
To install, use `pip`
2222

2323
```bash
24-
pip install --upgrade ibm-whcs-sdk
24+
pip install --upgrade acd-sdk
2525
```
2626

2727
## Using the SDK

0 commit comments

Comments
 (0)