Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb85b6cd98 | |||
| 832ab74c5e | |||
| a37e11a3ba | |||
| bd735a8dfd | |||
| 4a5e6c947f | |||
| 74b36ab19f | |||
| bb01257890 | |||
| 3a09c951a0 | |||
| 2a74a552cf | |||
| 21651e167b | |||
| 0b487a0782 | |||
| 64c0ae0965 | |||
| bc4e40d390 | |||
| 45bb85c360 | |||
| b03ea1fc54 | |||
| a7b78ed8ae | |||
| 584180f6b0 | |||
| a16380503b |
+1
-1
@@ -9,4 +9,4 @@ SPECKLE_TOKEN=undefined
|
||||
SPECKLE_USER_ID=undefined
|
||||
SPECKLE_URL=undefined
|
||||
SPECKLE_SAMPLE_PROJECT_ID=undefined
|
||||
SPECKLE_SAMPLE_MODEL_ID=undefined
|
||||
SPECKLE_SAMPLE_MODEL_ID=undefined
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Linting
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
NPM_REGISTRY_URL:
|
||||
required: false
|
||||
type: string
|
||||
default: 'https://registry.npmjs.org/'
|
||||
TAILSCALE_CONNECT_FOR_NPM:
|
||||
required: false
|
||||
type: string
|
||||
default: 'false'
|
||||
secrets:
|
||||
TAILSCALE_OAUTH_CLIENT_ID:
|
||||
required: false
|
||||
TAILSCALE_OAUTH_CLIENT_AUDIENCE:
|
||||
required: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-linting-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions: {} # purposefully empty by default at workflow level, explicitly overridden for specific jobs below
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # for publishing to npm using OIDC
|
||||
|
||||
env:
|
||||
NPM_REGISTRY_URL: ${{ inputs.NPM_REGISTRY_URL }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Enable Corepack and Install Correct Yarn Version
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare "yarn@$(jq -r .packageManager package.json | cut -d'@' -f2)" --activate
|
||||
yarn --version
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.14.0'
|
||||
cache: yarn
|
||||
|
||||
- name: Configure auth to npm registry for @speckle packages
|
||||
if: inputs.TAILSCALE_CONNECT_FOR_NPM == 'true'
|
||||
run: |
|
||||
cat <<EOT >> .yarnrc.yml
|
||||
|
||||
npmScopes:
|
||||
"speckle":
|
||||
npmRegistryServer: "${NPM_REGISTRY_URL}"
|
||||
EOT
|
||||
- name: Connect to Tailscale
|
||||
uses: tailscale/github-action@a392da0a182bba0e9613b6243ebd69529b1878aa
|
||||
if: inputs.TAILSCALE_CONNECT_FOR_NPM == 'true'
|
||||
with:
|
||||
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
|
||||
audience: ${{ secrets.TAILSCALE_OAUTH_CLIENT_AUDIENCE }}
|
||||
tags: tag:ci
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Run Linter
|
||||
run: yarn lint
|
||||
@@ -1,44 +0,0 @@
|
||||
name: Linting
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint-and-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.14.0'
|
||||
|
||||
- name: Enable Corepack and Install Correct Yarn Version
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare yarn@$(jq -r .packageManager package.json | cut -d'@' -f2) --activate
|
||||
yarn --version
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
**/node_modules
|
||||
.yarn/cache
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Run Linter
|
||||
run: yarn lint
|
||||
|
||||
- name: Run generate
|
||||
run: yarn generate
|
||||
@@ -0,0 +1,80 @@
|
||||
name: Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pr-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions: {} # purposefully empty by default at workflow level, explicitly overridden for specific jobs below
|
||||
jobs:
|
||||
lint:
|
||||
name: Linting
|
||||
uses: ./.github/workflows/lint.yml
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # for connecting to private NPM registry using OIDC Connect
|
||||
with:
|
||||
NPM_REGISTRY_URL: ${{ vars.NPM_REGISTRY_URL }}
|
||||
TAILSCALE_CONNECT_FOR_NPM: ${{ vars.TAILSCALE_CONNECT_FOR_NPM }}
|
||||
secrets:
|
||||
TAILSCALE_OAUTH_CLIENT_ID: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
|
||||
TAILSCALE_OAUTH_CLIENT_AUDIENCE: ${{ secrets.TAILSCALE_OAUTH_CLIENT_AUDIENCE }}
|
||||
|
||||
build:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # for connecting to private NPM registry using OIDC Connect
|
||||
|
||||
env:
|
||||
NPM_REGISTRY_URL: ${{ vars.NPM_REGISTRY_URL }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Enable Corepack and Install Correct Yarn Version
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare "yarn@$(jq -r .packageManager package.json | cut -d'@' -f2)" --activate
|
||||
yarn --version
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.14.0'
|
||||
cache: yarn
|
||||
|
||||
- name: Configure auth to npm registry for @speckle packages
|
||||
if: vars.TAILSCALE_CONNECT_FOR_NPM == 'true'
|
||||
run: |
|
||||
cat <<EOT >> .yarnrc.yml
|
||||
npmScopes:
|
||||
'speckle':
|
||||
npmRegistryServer: '${NPM_REGISTRY_URL}'
|
||||
EOT
|
||||
- name: Connect to Tailscale
|
||||
uses: tailscale/github-action@a392da0a182bba0e9613b6243ebd69529b1878aa
|
||||
if: vars.TAILSCALE_CONNECT_FOR_NPM == 'true'
|
||||
with:
|
||||
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
|
||||
audience: ${{ secrets.TAILSCALE_OAUTH_CLIENT_AUDIENCE }}
|
||||
tags: tag:ci
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Netlify build
|
||||
uses: netlify/actions/cli@3185065f4ab2f6df6f2ef41ee013626e1c02a426
|
||||
with:
|
||||
args: build
|
||||
env:
|
||||
{} #TODO
|
||||
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
@@ -0,0 +1,83 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-release-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions: {} # purposefully empty by default at workflow level, explicitly overridden for specific jobs below
|
||||
jobs:
|
||||
lint:
|
||||
name: Linting
|
||||
uses: ./.github/workflows/lint.yml
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # for connecting to private NPM registry using OIDC Connect
|
||||
with:
|
||||
NPM_REGISTRY_URL: ${{ vars.NPM_REGISTRY_URL }}
|
||||
TAILSCALE_CONNECT_FOR_NPM: ${{ vars.TAILSCALE_CONNECT_FOR_NPM }}
|
||||
secrets:
|
||||
TAILSCALE_OAUTH_CLIENT_ID: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
|
||||
TAILSCALE_OAUTH_CLIENT_AUDIENCE: ${{ secrets.TAILSCALE_OAUTH_CLIENT_AUDIENCE }}
|
||||
|
||||
publish:
|
||||
needs: [lint]
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # for connecting to private NPM registry using OIDC Connect
|
||||
|
||||
env:
|
||||
NPM_REGISTRY_URL: ${{ vars.NPM_REGISTRY_URL }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Enable Corepack and Install Correct Yarn Version
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare "yarn@$(jq -r .packageManager package.json | cut -d'@' -f2)" --activate
|
||||
yarn --version
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.14.0'
|
||||
cache: yarn
|
||||
|
||||
- name: Configure auth to npm registry for @speckle packages
|
||||
if: vars.TAILSCALE_CONNECT_FOR_NPM == 'true'
|
||||
run: |
|
||||
cat <<EOT >> .yarnrc.yml
|
||||
npmScopes:
|
||||
'speckle':
|
||||
npmRegistryServer: '${NPM_REGISTRY_URL}'
|
||||
EOT
|
||||
- name: Connect to Tailscale
|
||||
uses: tailscale/github-action@a392da0a182bba0e9613b6243ebd69529b1878aa
|
||||
if: vars.TAILSCALE_CONNECT_FOR_NPM == 'true'
|
||||
with:
|
||||
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
|
||||
audience: ${{ secrets.TAILSCALE_OAUTH_CLIENT_AUDIENCE }}
|
||||
tags: tag:ci
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Netlify publish
|
||||
uses: netlify/actions/cli@3185065f4ab2f6df6f2ef41ee013626e1c02a426
|
||||
with:
|
||||
args: publish
|
||||
env:
|
||||
{} #TODO
|
||||
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
@@ -14,6 +14,7 @@ coverage
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
.yarn
|
||||
.yarnrc.yml
|
||||
|
||||
# Profiler output
|
||||
events.json
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"lint:css": "stylelint \"**/*.{css,vue}\"",
|
||||
"lint": "yarn lint:js && yarn lint:tsc && yarn lint:prettier && yarn lint:css",
|
||||
"lint:ci": "yarn lint:tsc && yarn lint:css",
|
||||
"prettier:fix": "prettier --config .prettierrc --ignore-path .prettierignore --write .",
|
||||
"gqlgen": "graphql-codegen",
|
||||
"gqlgen:watch": "graphql-codegen --watch"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user