Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Scullin committed Mar 25, 2024
1 parent 9d9df6b commit da24a31
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/db-bigquery.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: BigQuery DB

on: [pull_request]
on:
pull_request:
workflow_call:
secrets:
BIGQUERY_KEY:
required: true

jobs:
test-bigquery:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/db-motherduck.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: MotherDuck DB

on: [pull_request]
on:
pull_request:
workflow_call:
secrets:
MOTHERDUCK_TOKEN:
required: true

jobs:
test-motherduck:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/db-postgres.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Postgres DB

on: [pull_request]
on: [pull_request, workflow_call]

jobs:
# Label of the container job
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/db-snowflake.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Snowflake DB

on: [pull_request]
on:
pull_request:
workflow_call:
secrets:
SNOWFLAKE_USER:
required: true
SNOWFLAKE_PASSWORD:
required: true

jobs:
test-snowflake:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Core

on: [pull_request]
on: [pull_request, workflow_call]

jobs:
test-all:
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: npmjs.com Pre-release

on: [push]

jobs:
db-bigquery:
uses: './.github/workflows/db-bigquery.yaml'
secrets:
BIGQUERY_KEY: ${{ secrets.BIGQUERY_KEY }}
db-motherduck:
uses: './.github/workflows/db-motherduck.yaml'
secrets:
MOTHERDUCK_TOKEN: ${{ secrets.MOTHERDUCK_TOKEN }}
db-postgres:
uses: './.github/workflows/db-postgres.yaml'
db-snowflake:
uses: './.github/workflows/db-snowflake.yaml'
secrets:
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
main:
uses: './.github/workflows/main.yaml'

npm-prerelease:
needs:
- db-bigquery
- db-motherduck
- db-postgres
- db-snowflake
- main
runs-on: ubuntu-latest
env:
PACKAGES: 'packages/malloy-interfaces packages/malloy packages/malloy-db-bigquery packages/malloy-db-duckdb packages/malloy-db-postgres packages/malloy-db-snowflake packages/malloy-db-trino packages/malloy-render packages/malloy-malloy-sql test packages/malloy-syntax-highlight'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: npm install, build, and publish
run: |
npm ci --loglevel error
npm run build
echo Publishing $PACKAGES
PRERELEASE=$(date +%y%m%d%H%M%S)
VERSION=$(jq -r .version ./lerna.json)-dev$PRERELEASE
npx lerna version $VERSION --yes --no-push --no-git-tag-version
for package in $PACKAGES; do
echo Publishing $package $VERSION
npm publish --dry-run -w $package --access=public --tag next
done

0 comments on commit da24a31

Please sign in to comment.