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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/publish-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflows will upload a Javscript Package using NPM to npmjs.org when a release is created
# For more information see: https://docs.github.com/en/actions/guides/publishing-nodejs-packages

name: Publish Javascript

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org"
- name: Prepare Release
working-directory: ./src/js
run: |
npm install -g npm@7.22.0
npm install
- name: Publish Release
working-directory: ./src/js
run: npm run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/publish-py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Publish Python

on:
release:
types: [published]

jobs:
release-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: "14.x"
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install latest NPM
run: |
npm install -g npm@7.22.0
npm --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/build-pkg.txt
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build --sdist --wheel --outdir dist .
twine upload dist/*
3 changes: 3 additions & 0 deletions requirements/build-pkg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
twine
wheel
build