Skip to content

Fix DuckDB ambiguous reference for vocab and result schema placeholders #510

Fix DuckDB ambiguous reference for vocab and result schema placeholders

Fix DuckDB ambiguous reference for vocab and result schema placeholders #510

Workflow file for this run

name: build npm pkg
on:
workflow_dispatch:
inputs:
GIT_REPO_FULL_NAME:
description: Select RepoName
required: false
type: choice
options:
- ohdsi/trex
- data2evidence/trex
GIT_BRANCH_NAME:
default: develop
description: Enter BranchName / ReleaseTagName
required: true
type: string
tag:
description: Enter tag for release
required: true
type: string
prerelease:
type: boolean
default: true
required: true
overwrite:
type: boolean
default: false
required: true
pull_request:
types: [opened, ready_for_review, reopened, synchronize]
push:
branches:
- develop
- deno2.5.6
env:
GIT_BRANCH_NAME: ${{ github.event.inputs.GIT_BRANCH_NAME || github.head_ref || github.ref_name }} # workflow_dispatch || pull_request || push
GIT_REPO_FULL_NAME: ${{ github.event.inputs.GIT_REPO_FULL_NAME || github.event.pull_request.head.repo.full_name || github.event.repository.full_name }} # workflow_dispatch || pull_request || push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_BRANCH_NAME }}
repository: ${{ env.GIT_REPO_FULL_NAME }}
- name: Update version
run: |
if [[ $GITHUB_EVENT_NAME == 'workflow_dispatch' ]]; then
RELEASE_VERSION=${{ github.event.inputs.tag }}
jq --arg v $RELEASE_VERSION '.version=$v' package.json > tmppkg; mv tmppkg package.json
elif [[ $GITHUB_REF_NAME == 'deno2.5.6' ]]; then
jq --arg v "-$(date +%s)-$GITHUB_SHA-d256" '.version+=$v' package.json > tmppkg; mv tmppkg package.json
else
jq --arg v "-$(date +%s)-$GITHUB_SHA" '.version+=$v' package.json > tmppkg; mv tmppkg package.json
fi
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18.x"
registry-url: "https://npm.pkg.github.com"
scope: "@${{ github.repository_owner }}"
- name: Publish
run: |
if [[ $SHOULD_PUBLISH == true ]]; then
npm publish
else
npm publish --dry-run
fi
env:
SHOULD_PUBLISH: ${{ github.ref_name == 'develop' || github.event_name == 'workflow_dispatch' }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/delete-package-versions@v5
if: github.ref_name == 'develop'
with:
package-name: "trex"
package-type: "npm"
min-versions-to-keep: 3
delete-only-pre-release-versions: "true"