Skip to content

Release to NPM and PyPI #4

Release to NPM and PyPI

Release to NPM and PyPI #4

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
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SNYK_TOKEN: xxxxa727
TWINE_NON_INTERACTIVE: xxxx
TWINE_PASSWORD: xxxxi3Xc
TWINE_REPOSITORY_URL: xxxxacy/
TWINE_USERNAME: xxxxen__
jobs:
release_to_npm:
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: Install Node dependencies
uses: "./.github/actions/install_node_dependencies"
- name: Build React application
run: |-
node -v
make build
# - name: Authenticate with registry
# run: |
# mkdir -p ~/repo/
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- name: Authenticate with registry
run: |
# echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
- name: Publish to npm
run: npm publish
env:
NPM_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/*