Skip to content

[enochian-js] v0.0.10 #22

[enochian-js] v0.0.10

[enochian-js] v0.0.10 #22

Workflow file for this run

name: Publish Studio
on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish-js:
if: startsWith(github.event.release.name, '[enochian-studio]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: "package.json"
- name: Create .npmrc
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "always-auth=true" >> .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: |
pnpm install
- name: Build package
env:
SGL_IP: ${{ secrets.SGL_IP }}
SGL_PORT: ${{ secrets.SGL_PORT }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
pushd studio
pnpm run ci
- name: Publish to NPM
run: |
pushd studio
pnpm publish --no-git-checks
publish-py:
if: startsWith(github.event.release.name, '[enochian-studio]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Uses Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Create .pypirc
run: |
echo "[pypi]" > ~/.pypirc
echo "username = __token__" >> ~/.pypirc
echo "password = $PYPI_TOKEN" >> ~/.pypirc
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Build package
run: |
pushd studio-python
pip install hatchling build twine
python -m build
- name: Publish to PyPi
run: |
pushd studio-python
twine check dist/*
twine upload dist/*