Skip to content

v0.2.6

v0.2.6 #35

name: Publish UPM packages
on:
release:
types: [published]
workflow_dispatch:
env:
ORT_VERSION: 1.20.0
ORT_EXTENSIONS_VERSION: 0.12.0
# Dry-run on workflow_dispatch
NPM_OPTS: ${{ github.event_name == 'workflow_dispatch' && '--dry-run' || '' }}
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- name: Cache .tmp folder
uses: actions/cache@v4
id: tmp-cache
with:
path: .tmp
key: tmp-ort${{ env.ORT_VERSION }}-ext${{ env.ORT_EXTENSIONS_VERSION }}-${{ hashFiles('scripts/*') }}
- name: Download ONNX libraries
run: |
./scripts/download-onnx-libs.sh ${{ env.ORT_VERSION }}
./scripts/download-onnx-extensions-libs.sh ${{ env.ORT_EXTENSIONS_VERSION }}
- name: Publish all NPM packages
run: |
publish_npm() {
cd $1
cp ../README.md .
npm publish ${{ env.NPM_OPTS }}
cd - > /dev/null
}
publish_npm com.github.asus4.onnxruntime
publish_npm com.github.asus4.onnxruntime.unity
publish_npm com.github.asus4.onnxruntime-extensions
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload linux-x64-gpu
uses: actions/upload-artifact@v4
with:
name: com.github.asus4.onnxruntime.linux-x64-gpu
path: com.github.asus4.onnxruntime.linux-x64-gpu
- name: Upload win-x64-gpu
uses: actions/upload-artifact@v4
with:
name: com.github.asus4.onnxruntime.win-x64-gpu
path: com.github.asus4.onnxruntime.win-x64-gpu