From b0d2f36ed7f176cdfe61e51853df28ed57e566b4 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Wed, 9 Oct 2024 19:23:57 +0300 Subject: [PATCH] --- .github/dependabot.yml | 50 ++++++++ .github/workflows/Dependabot.yml | 45 +++++++ .github/workflows/GitHub.yml | 59 ++++++++++ .github/workflows/NPM.yml | 123 +++++++++++++++++++ .github/workflows/Node.yml | 196 +++++++++++++++++++++++++++++++ package.json | 104 ++++++++-------- 6 files changed, 525 insertions(+), 52 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/Dependabot.yml create mode 100644 .github/workflows/GitHub.yml create mode 100644 .github/workflows/NPM.yml create mode 100644 .github/workflows/Node.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..6586792629 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,50 @@ +version: 2 +enable-beta-ecosystems: true + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/packages/cli-generator" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/packages/compatibility-table" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/packages/config-generator" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/packages/i18n-tracker" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/packages/js-api-generator" + schedule: + interval: "daily" + versioning-strategy: increase + + - package-ecosystem: "npm" + directory: "/packages/releases-generator" + schedule: + interval: "daily" + versioning-strategy: increase diff --git a/.github/workflows/Dependabot.yml b/.github/workflows/Dependabot.yml new file mode 100644 index 0000000000..387fece7f1 --- /dev/null +++ b/.github/workflows/Dependabot.yml @@ -0,0 +1,45 @@ +name: Dependabot + +concurrency: + group: Dependabot-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + pull_request: + +jobs: + Approve: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.2.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + Merge: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v2.2.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/GitHub.yml b/.github/workflows/GitHub.yml new file mode 100644 index 0000000000..161ef34a4f --- /dev/null +++ b/.github/workflows/GitHub.yml @@ -0,0 +1,59 @@ +name: GitHub + +concurrency: + group: GitHub-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + issues: write + pull-requests: write + +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + Assign: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + TERRAFORM_TELEMETRY: 0 + VCPKG_DISABLE_METRICS: 1 + + steps: + - uses: pozil/auto-assign-issue@v2.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + assignees: NikolaRHristov + numOfAssignee: 1 diff --git a/.github/workflows/NPM.yml b/.github/workflows/NPM.yml new file mode 100644 index 0000000000..3edce73ca3 --- /dev/null +++ b/.github/workflows/NPM.yml @@ -0,0 +1,123 @@ +name: NPM + +concurrency: + group: NPM-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + release: + types: [created] + workflow_call: + +jobs: + Publish: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + TERRAFORM_TELEMETRY: 0 + VCPKG_DISABLE_METRICS: 1 + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4.2.1 + + - uses: actions/setup-node@v4.0.4 + with: + node-version: "18" + registry-url: "https://registry.npmjs.org" + + - run: npm install -g npm + + - name: Publish . + continue-on-error: true + working-directory: . + run: | + npm publish --legacy-peer-deps --provenance --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./packages/cli-generator + continue-on-error: true + working-directory: ./packages/cli-generator + run: | + npm publish --legacy-peer-deps --provenance --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./packages/compatibility-table + continue-on-error: true + working-directory: ./packages/compatibility-table + run: | + npm publish --legacy-peer-deps --provenance --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./packages/config-generator + continue-on-error: true + working-directory: ./packages/config-generator + run: | + npm publish --legacy-peer-deps --provenance --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./packages/i18n-tracker + continue-on-error: true + working-directory: ./packages/i18n-tracker + run: | + npm publish --legacy-peer-deps --provenance --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./packages/js-api-generator + continue-on-error: true + working-directory: ./packages/js-api-generator + run: | + npm publish --legacy-peer-deps --provenance --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish ./packages/releases-generator + continue-on-error: true + working-directory: ./packages/releases-generator + run: | + npm publish --legacy-peer-deps --provenance --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/Node.yml b/.github/workflows/Node.yml new file mode 100644 index 0000000000..53c6a7f5a6 --- /dev/null +++ b/.github/workflows/Node.yml @@ -0,0 +1,196 @@ +name: Node + +concurrency: + group: Node-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + security-events: write + contents: write + pull-requests: write + +on: + workflow_dispatch: + push: + branches: [Current] + pull_request: + branches: [Current] + workflow_call: + +jobs: + Pre-Publish: + runs-on: ubuntu-latest + + env: + ADBLOCK: true + ASTRO_TELEMETRY_DISABLED: 1 + AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 + AZURE_CORE_COLLECT_TELEMETRY: 0 + CHOOSENIM_NO_ANALYTICS: 1 + DIEZ_DO_NOT_TRACK: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 + DO_NOT_TRACK: 1 + ET_NO_TELEMETRY: 1 + GATSBY_TELEMETRY_DISABLED: 1 + GATSBY_TELEMETRY_OPTOUT: 1 + GATSBY_TELEMETRY_OPT_OUT: 1 + GRIT_TELEMETRY_DISABLED: 1 + HASURA_GRAPHQL_ENABLE_TELEMETRY: false + HINT_TELEMETRY: off + HOMEBREW_NO_ANALYTICS: 1 + INFLUXD_REPORTING_DISABLED: true + ITERATIVE_DO_NOT_TRACK: 1 + NEXT_TELEMETRY_DEBUG: 1 + NEXT_TELEMETRY_DISABLED: 1 + NG_CLI_ANALYTICS: false + NUXT_TELEMETRY_DISABLED: 1 + PIN_DO_NOT_TRACK: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + SAM_CLI_TELEMETRY: 0 + STNOUPGRADE: 1 + STRIPE_CLI_TELEMETRY_OPTOUT: 1 + TELEMETRY_DISABLED: 1 + TERRAFORM_TELEMETRY: 0 + VCPKG_DISABLE_METRICS: 1 + + strategy: + matrix: + node-version: [18, 19, 20] + + steps: + - uses: actions/checkout@v4.2.1 + + - uses: pnpm/action-setup@v4.0.0 + with: + version: 9.3.0 + run_install: | + - recursive: true + args: [ + --link-workspace-packages=true, + --lockfile-only, + --prefer-frozen-lockfile=false, + --shamefully-hoist=false, + --shared-workspace-lockfile=true, + --strict-peer-dependencies=false, + --unsafe-perm=true + ] + + - uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./pnpm-lock.yaml + + - run: pnpm install + working-directory: . + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.4.2 + with: + name: .-Node-${{ matrix.node-version }}-Target + path: ./Target + + - uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./packages/cli-generator/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./packages/cli-generator + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.4.2 + with: + name: .-packages-cli-generator-Node-${{ matrix.node-version }}-Target + path: ./packages/cli-generator/Target + + - uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./packages/compatibility-table/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./packages/compatibility-table + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.4.2 + with: + name: .-packages-compatibility-table-Node-${{ matrix.node-version }}-Target + path: ./packages/compatibility-table/Target + + - uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./packages/config-generator/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./packages/config-generator + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.4.2 + with: + name: .-packages-config-generator-Node-${{ matrix.node-version }}-Target + path: ./packages/config-generator/Target + + - uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./packages/i18n-tracker/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./packages/i18n-tracker + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.4.2 + with: + name: .-packages-i18n-tracker-Node-${{ matrix.node-version }}-Target + path: ./packages/i18n-tracker/Target + + - uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./packages/js-api-generator/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./packages/js-api-generator + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.4.2 + with: + name: .-packages-js-api-generator-Node-${{ matrix.node-version }}-Target + path: ./packages/js-api-generator/Target + + - uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + cache-dependency-path: ./packages/releases-generator/pnpm-lock.yaml + + - run: pnpm install + working-directory: ./packages/releases-generator + + - run: pnpm run build + working-directory: . + + - uses: actions/upload-artifact@v4.4.2 + with: + name: .-packages-releases-generator-Node-${{ matrix.node-version }}-Target + path: ./packages/releases-generator/Target diff --git a/package.json b/package.json index 9a3388ea1c..17ae2149cb 100644 --- a/package.json +++ b/package.json @@ -1,54 +1,54 @@ { - "name": "tauri-docs", - "type": "module", - "private": true, - "license": "MIT", - "version": "0.0.1", - "scripts": { - "dev:setup:submodules": "git submodule update --init", - "dev:setup:tauri": "pnpm install -C packages/tauri/packages/api --ignore-workspace --no-frozen-lockfile", - "dev:setup:plugins-workspace": "pnpm --prefix packages/plugins-workspace install", - "dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri && pnpm dev:setup:plugins-workspace", - "dev": "astro dev", - "format": "prettier -w --cache --plugin prettier-plugin-astro .", - "format:check": "prettier -c --cache --plugin prettier-plugin-astro .", - "build:compatibility-table": "pnpm --filter compatibility-table run build", - "build:references": "pnpm --filter js-api-generator run build", - "build:releases": "pnpm --filter releases-generator run build", - "build:config": "pnpm --filter config-generator run build", - "build:cli": "pnpm --filter cli-generator run build", - "build:astro": "astro build", - "build:i18n": "pnpm --filter docs-i18n-tracker run build", - "build": "pnpm dev:setup && pnpm build:references && pnpm build:config && pnpm build:cli && pnpm build:releases && pnpm build:compatibility-table && pnpm build:astro && pnpm build:i18n", - "preview": "astro preview" - }, - "dependencies": { - "@astrojs/markdown-remark": "^5.2.0", - "@astrojs/rss": "^4.0.7", - "@astrojs/starlight": "0.28.3", - "@lorenzo_lewis/starlight-utils": "^0.2.0", - "@types/json-schema": "^7.0.15", - "astro": "^4.15.12", - "astro-d2": "^0.5.2", - "astro-feelback": "^0.3.4", - "astrojs-service-worker": "^2.0.0", - "jsdom": "^25.0.1", - "prettier": "^3.3.3", - "prettier-plugin-astro": "^0.14.1", - "rehype-autolink-headings": "^7.1.0", - "sass": "^1.79.4", - "sharp": "^0.33.5", - "shiki": "^1.22.0", - "starlight-blog": "^0.13.0", - "starlight-links-validator": "^0.12.3" - }, - "packageManager": "pnpm@9.12.1", - "engines": { - "pnpm": "^9.0.0" - }, - "pnpm": { - "patchedDependencies": { - "@astrojs/starlight@0.28.2": "patches/@astrojs__starlight@0.28.2.patch" - } - } + "name": "tauri-docs", + "version": "0.0.1", + "private": true, + "license": "MIT", + "type": "module", + "scripts": { + "build": "pnpm dev:setup && pnpm build:references && pnpm build:config && pnpm build:cli && pnpm build:releases && pnpm build:compatibility-table && pnpm build:astro && pnpm build:i18n", + "build:astro": "astro build", + "build:cli": "pnpm --filter cli-generator run build", + "build:compatibility-table": "pnpm --filter compatibility-table run build", + "build:config": "pnpm --filter config-generator run build", + "build:i18n": "pnpm --filter docs-i18n-tracker run build", + "build:references": "pnpm --filter js-api-generator run build", + "build:releases": "pnpm --filter releases-generator run build", + "dev": "astro dev", + "dev:setup": "pnpm dev:setup:submodules && pnpm dev:setup:tauri && pnpm dev:setup:plugins-workspace", + "dev:setup:plugins-workspace": "pnpm --prefix packages/plugins-workspace install", + "dev:setup:submodules": "git submodule update --init", + "dev:setup:tauri": "pnpm install -C packages/tauri/packages/api --ignore-workspace --no-frozen-lockfile", + "format": "prettier -w --cache --plugin prettier-plugin-astro .", + "format:check": "prettier -c --cache --plugin prettier-plugin-astro .", + "preview": "astro preview" + }, + "dependencies": { + "@astrojs/markdown-remark": "^5.2.0", + "@astrojs/rss": "^4.0.7", + "@astrojs/starlight": "0.28.3", + "@lorenzo_lewis/starlight-utils": "^0.2.0", + "@types/json-schema": "^7.0.15", + "astro": "^4.15.12", + "astro-d2": "^0.5.2", + "astro-feelback": "^0.3.4", + "astrojs-service-worker": "^2.0.0", + "jsdom": "^25.0.1", + "prettier": "^3.3.3", + "prettier-plugin-astro": "^0.14.1", + "rehype-autolink-headings": "^7.1.0", + "sass": "^1.79.4", + "sharp": "^0.33.5", + "shiki": "^1.22.0", + "starlight-blog": "^0.13.0", + "starlight-links-validator": "^0.12.3" + }, + "packageManager": "pnpm@9.12.1", + "engines": { + "pnpm": "^9.0.0" + }, + "pnpm": { + "patchedDependencies": { + "@astrojs/starlight@0.28.2": "patches/@astrojs__starlight@0.28.2.patch" + } + } }