From dc1f2a2dea09e5a53db190f9d7d8a9b357ef5e82 Mon Sep 17 00:00:00 2001 From: Lotus Date: Wed, 26 Apr 2023 13:34:23 +0100 Subject: [PATCH] ci: update github workflows --- .github/workflows/cron-run.yml | 46 ++++++++++---------------- .github/workflows/manual-run-force.yml | 38 ++++++++++----------- .github/workflows/manual-run.yml | 38 ++++++++++----------- 3 files changed, 56 insertions(+), 66 deletions(-) diff --git a/.github/workflows/cron-run.yml b/.github/workflows/cron-run.yml index 052f922..4eaeb14 100644 --- a/.github/workflows/cron-run.yml +++ b/.github/workflows/cron-run.yml @@ -10,32 +10,32 @@ jobs: steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: "0" - - name: Install packages - run: yarn + - name: Enable PNPM + uses: pnpm/action-setup@v2 - - name: Query API - run: yarn parser:gen $GOOGLE_API_KEY - env: - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - - - name: Parse APIv1 - run: yarn parser:v1 + - name: Set node version to 18 + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "pnpm" - - name: Parse APIv2 - run: yarn parser:v2 + - name: Install + run: pnpm install --frozen-lockfile - - name: Scrape variable fonts - run: yarn variable:gen + - name: Build project + run: pnpm run build - - name: Parse variable fonts - run: yarn variable:parse + - name: Generate API + run: pnpm run cli generate $GOOGLE_API_KEY + env: + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - - name: Format files - run: yarn format:prettier + - name: Parse API + run: pnpm run cli parse - name: Stage, commit and push files uses: stefanzweifel/git-auto-commit-action@v4 @@ -45,13 +45,3 @@ jobs: commit_author: "fontsource-bot <83556432+fontsource-bot@users.noreply.github.com>" commit_message: "chore(build): update API [Weekly]" continue-on-error: true - - - name: Publish to NPM - - uses: actions/setup-node@v2 - with: - node-version: '16.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/manual-run-force.yml b/.github/workflows/manual-run-force.yml index 9f850ea..459e264 100644 --- a/.github/workflows/manual-run-force.yml +++ b/.github/workflows/manual-run-force.yml @@ -6,36 +6,36 @@ jobs: build: runs-on: ubuntu-latest - if: github.actor == 'DecliningLotus' + if: github.actor == 'ayuhito' || github.actor == 'jwr12135' steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: "0" - - name: Install packages - run: yarn + - name: Enable PNPM + uses: pnpm/action-setup@v2 - - name: Query API - run: yarn parser:gen $GOOGLE_API_KEY - env: - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - - - name: Parse APIv1 - run: yarn parser:v1 --force + - name: Set node version to 18 + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "pnpm" - - name: Parse APIv2 - run: yarn parser:v2 --force + - name: Install + run: pnpm install --frozen-lockfile - - name: Scrape variable fonts - run: yarn variable:gen + - name: Build project + run: pnpm run build - - name: Parse variable fonts - run: yarn variable:parse + - name: Generate API + run: pnpm run cli generate $GOOGLE_API_KEY + env: + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - - name: Format files - run: yarn format:prettier + - name: Parse API + run: pnpm run cli parse --force - name: Stage, commit and push files uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/.github/workflows/manual-run.yml b/.github/workflows/manual-run.yml index dca4d5f..541cd1d 100644 --- a/.github/workflows/manual-run.yml +++ b/.github/workflows/manual-run.yml @@ -6,36 +6,36 @@ jobs: build: runs-on: ubuntu-latest - if: github.actor == 'DecliningLotus' + if: github.actor == 'ayuhito' || github.actor == 'jwr12135' steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: "0" - - name: Install packages - run: yarn + - name: Enable PNPM + uses: pnpm/action-setup@v2 - - name: Query API - run: yarn parser:gen $GOOGLE_API_KEY - env: - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - - - name: Parse APIv1 - run: yarn parser:v1 + - name: Set node version to 18 + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "pnpm" - - name: Parse APIv2 - run: yarn parser:v2 + - name: Install + run: pnpm install --frozen-lockfile - - name: Scrape variable fonts - run: yarn variable:gen + - name: Build project + run: pnpm run build - - name: Parse variable fonts - run: yarn variable:parse + - name: Generate API + run: pnpm run cli generate $GOOGLE_API_KEY + env: + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - - name: Format files - run: yarn format:prettier + - name: Parse API + run: pnpm run cli parse - name: Stage, commit and push files uses: stefanzweifel/git-auto-commit-action@v4