v0.1.12 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish UPM packages | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
env: | |
ORT_VERSION: 1.17.0 | |
ORT_EXTENSIONS_VERSION: 0.9.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: | | |
for dir in com.github.asus4.*; do | |
cd ${{ github.workspace }}/$dir | |
cp ../README.md . | |
npm publish ${{ env.NPM_OPTS }} | |
done | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |