Skip to content

Commit

Permalink
ci: update github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Apr 26, 2023
1 parent b78a647 commit dc1f2a2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 66 deletions.
46 changes: 18 additions & 28 deletions .github/workflows/cron-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
38 changes: 19 additions & 19 deletions .github/workflows/manual-run-force.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/manual-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc1f2a2

Please sign in to comment.