adds docker feature in devvontainer.json #12
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
name: Publish Pypi Package | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- VERSION | |
workflow_dispatch: | |
env: | |
PIP_PACKAGE_NAME: rw-devtools | |
jobs: | |
publish-pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get version | |
run: |- | |
if [[ -s VERSION ]]; then | |
VERSION=$(cat VERSION) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "VERSION extracted: $VERSION" | |
else | |
echo "VERSION file is missing or empty" >&2 | |
exit 1 | |
fi | |
- name: Build Package | |
run: |- | |
pip install setuptools wheel twine | |
python setup.py sdist bdist_wheel | |
- name: Publish | |
run: |- | |
twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} | |
- name: Notify Slack of pip update | |
uses: slackapi/slack-github-action@v1.19.0 | |
with: | |
channel-id: "#codecollections" # Slack channel id or name to post message. https://api.slack.com/methods/chat.postMessage#channels | |
slack-message: "Just deployed version ${{ env.VERSION }} of ${{ env.PIP_PACKAGE_NAME}} to https://pypi.org/project/${{ env.PIP_PACKAGE_NAME }}" | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |