Skip to content

Release to NPM and PyPI #19

Release to NPM and PyPI

Release to NPM and PyPI #19

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches-ignore:
- '**'
workflow_dispatch:
env:
AWS_REGION: xxxxst-2
CACHE_VERSION: xxxx
SNYK_TOKEN: xxxxa727
TWINE_NON_INTERACTIVE: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_REPOSITORY_URL: ${{ secrets.TWINE_REPOSITORY_URL }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
jobs:
# release_to_npm:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/[email protected]
# - uses: actions/setup-node@v4
# with:
# node-version: 16.13.2
# registry-url: 'https://registry.npmjs.org'
# - name: Install Node dependencies
# run: npm ci
# - name: Build React application
# run: |-
# node -v
# make build
# - name: Publish to npm
# run: npm publish --access=public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
release_to_pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Cache python packages for Linux
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ubuntu-latest-python-3.9
- name: Setup Python environment
uses: "./.github/actions/setup_python_env"
- name: Install Node dependencies
uses: "./.github/actions/install_node_dependencies"
- name: Build React application
run: |-
node -v
make build
- name: Make Python package
run: make package
- name: Install twine
run: python -m pip install -U twine
- name: Publish to PyPI
run: python -m twine upload package/dist/*