mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 02:06:01 +00:00
117 lines
2.6 KiB
YAML
117 lines
2.6 KiB
YAML
name: NPM packages PREMIUM
|
|
|
|
# on: [push]
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
|
|
# on:
|
|
# push:
|
|
# branches:
|
|
# - production
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-22.04]
|
|
|
|
steps:
|
|
- name: Context
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
run: echo "$GITHUB_CONTEXT"
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js 22.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 22.x
|
|
|
|
- _include: checkout-and-merge-pro
|
|
|
|
- name: adjustNpmPackageJsonPremium
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
node adjustNpmPackageJsonPremium
|
|
|
|
# - name: Configure NPM token
|
|
# env:
|
|
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
# run: |
|
|
# cd ..
|
|
# cd dbgate-merged
|
|
# npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
|
|
# Ensure npm 11.5.1 or later is installed
|
|
- name: Update npm
|
|
run: npm install -g npm@latest
|
|
|
|
- name: Remove dbmodel - should be not published
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
rm -rf packages/dbmodel
|
|
|
|
- name: yarn install
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
yarn install
|
|
|
|
- name: setCurrentVersion
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
yarn setCurrentVersion
|
|
|
|
- name: Compute npm dist-tag
|
|
run: |
|
|
if [[ "${GITHUB_REF_NAME}" =~ -alpha\. ]]; then
|
|
echo "NPM_TAG=alpha" >> $GITHUB_ENV
|
|
else
|
|
echo "NPM_TAG=latest" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: Publish dbgate-api-premium
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged/packages/api
|
|
npm publish --tag "$NPM_TAG"
|
|
|
|
- name: Publish dbgate-web-premium
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged/packages/web
|
|
npm publish --tag "$NPM_TAG"
|
|
|
|
- name: Publish dbgate-serve-premium
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged/packages/serve
|
|
npm publish --tag "$NPM_TAG"
|
|
|
|
- name: Publish dbgate-plugin-cosmosdb
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged/plugins/dbgate-plugin-cosmosdb
|
|
npm publish --tag "$NPM_TAG"
|
|
|
|
- name: Publish dbgate-plugin-firestore
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged/plugins/dbgate-plugin-firestore
|
|
npm publish --tag "$NPM_TAG"
|