diff --git a/.github/workflows/cron-run.yml b/.github/workflows/cron-run.yml index ab10c7f656d..c06d532ff10 100644 --- a/.github/workflows/cron-run.yml +++ b/.github/workflows/cron-run.yml @@ -29,9 +29,15 @@ jobs: - name: Parse APIv1 run: npm explore google-font-metadata -- yarn parser:v1 - - name: Build fonts + - name: Build fonts APIv1 run: yarn build:googlev1 + - name: Parse APIv2 + run: npm explore google-font-metadata -- yarn parser:v2 + + - name: Build fonts APIv2 + run: yarn build:googlev2 + - name: Format files run: yarn format diff --git a/.github/workflows/manual-run-force.yml b/.github/workflows/manual-run-force.yml new file mode 100644 index 00000000000..9c75e96b457 --- /dev/null +++ b/.github/workflows/manual-run-force.yml @@ -0,0 +1,69 @@ +name: Build and Release [Force Rebuild] [Manual] + +on: [workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + + if: github.actor == 'DecliningLotus' + + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + + - name: Configure CI Git User + run: | + git config --global user.name 'DecliningLotus' + git config --global user.email 'DecliningLotus@users.noreply.github.com' + + - name: Install packages + run: yarn + + - name: Fetch API + run: npm explore google-font-metadata -- node ./scripts/api-gen.js $GOOGLE_API_KEY + env: + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} + + - name: Parse APIv1 + run: npm explore google-font-metadata -- yarn parser:v1 + + - name: Build fonts APIv1 + run: yarn build:googlev1-force + + - name: Parse APIv2 + run: npm explore google-font-metadata -- yarn parser:v2 + + - name: Build fonts APIv2 + run: yarn build:googlev2-force + + - name: Format files + run: yarn format + + - name: Stage changes + run: git add --all + + - name: Commit files + run: >- + git commit -m "chore(build): update fontsources $GITHUB_RUN_NUMBER" + continue-on-error: true + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Authenticate with Registry + run: | + yarn logout + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish package + run: npm run deploy:ci + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/manual-run.yml b/.github/workflows/manual-run.yml index 0589c370e13..c56f500ebf6 100644 --- a/.github/workflows/manual-run.yml +++ b/.github/workflows/manual-run.yml @@ -30,9 +30,15 @@ jobs: - name: Parse APIv1 run: npm explore google-font-metadata -- yarn parser:v1 - - name: Build fonts + - name: Build fonts APIv1 run: yarn build:googlev1 + - name: Parse APIv2 + run: npm explore google-font-metadata -- yarn parser:v2 + + - name: Build fonts APIv2 + run: yarn build:googlev2 + - name: Format files run: yarn format diff --git a/CHANGELOG.md b/CHANGELOG.md index e9e53320c64..f1ce2fad561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,24 @@ Fontsource will log all notable changes within this file. #### Patch (0.0.x) -These are not logged here as they are typically automatic updates from the source, such as Google, themselves. On occasion, patches may be applied from Fontsource, however, different fonts are likely to be associated with different versions per update and isn't accurately tracked here. +These occur when an automatic update is pushed from a source, such as Google, or Fontsource may apply patches. Due to version mismatching and lack of accurate tracking, a specific version for a Fontsource patch cannot be logged. Fixes are mentioned in each minor update instead. -#### Minor (0.x.x) +# 3.x Release -These updates are usually feature additions or changes from Fontsource that are logged below. +## 3.0.x + +### BREAKING CHANGES + +`import fontsource-` or `index.css` no longer defaults to contain ALL weights and styles for a font. It now only contains weight 400 with all styles included. This was changed to prevent fonts, such as Noto Sans JP, to counter-intuitively generate 1MB+ CSS files with the new unicode-range feature. + +Simply choose the necessary weights and styles from now on with `import fontsource-/.css` or `import fontsource-/-