-
Notifications
You must be signed in to change notification settings - Fork 0
Add Vietnamese #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Vietnamese #42
Changes from all commits
f5ed764
d83584e
56ca1bb
20491e3
ca114fe
9919589
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,31 @@ | ||
| name: Build font and specimen | ||
|
|
||
| on: push | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| tags: | ||
| - '*' | ||
|
|
||
| permissions: write-all | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build and test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v5 | ||
| - uses: actions/checkout@v6 | ||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.10" | ||
| python-version: "3.11" | ||
|
Comment on lines
+19
to
+23
|
||
| - name: Setup fontspector | ||
| uses: fonttools/setup-fontspector@main | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Install sys tools/deps | ||
| - name: Install toolset | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install ttfautohint libcairo2-dev python3-cairo-dev pkg-config python3-dev | ||
|
|
@@ -27,10 +36,10 @@ jobs: | |
| key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-venv- | ||
| - name: gen zip file name | ||
| - name: Set artifact file name | ||
| id: zip-name | ||
| shell: bash | ||
| # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" | ||
| # Set the archive name to repo name + "-fonts" e.g "radiocanadafonts-fonts.zip" | ||
| run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV | ||
|
|
||
| # If a new release is cut, use the release tag to auto-bump the source files | ||
|
|
@@ -51,13 +60,13 @@ jobs: | |
| - name: Check with fontspector | ||
| run: make test | ||
| continue-on-error: true | ||
| - name: proof | ||
| - name: Generate proofs | ||
| run: make proof | ||
| - name: setup site | ||
| - name: Set up test result site | ||
| run: cp scripts/index.html out/index.html | ||
| - name: Deploy | ||
| uses: actions/upload-pages-artifact@v3.0.1 | ||
| - name: Collect deployment assets | ||
| if: ${{ github.ref == 'refs/heads/main' }} | ||
| uses: actions/upload-pages-artifact@v4 | ||
| with: | ||
| path: ./out | ||
| - name: Archive artifacts | ||
|
|
@@ -69,9 +78,10 @@ jobs: | |
| out | ||
| outputs: | ||
| zip_name: ${{ env.ZIP_NAME }} | ||
| ## This section can be un-mute when the repo is public and github pages are available | ||
|
|
||
| # deploy: | ||
| # name: Deploy website to GitHub Pages | ||
| # name: Deploy results to GitHub Pages | ||
| # if: ${{ github.ref == 'refs/heads/main' }} | ||
| # needs: build | ||
| # runs-on: ubuntu-latest | ||
| # permissions: | ||
|
|
@@ -84,36 +94,36 @@ jobs: | |
| # - name: Deploy to GitHub Pages | ||
| # id: deployment | ||
| # uses: actions/deploy-pages@v4 | ||
|
|
||
| # There are two ways a release can be created: either by pushing a tag, or by | ||
| # creating a release from the GitHub UI. Pushing a tag does not automatically | ||
| # create a release, so we have to do that ourselves. However, creating a | ||
| # release from the GitHub UI *does* push a tag, and we don't want to create | ||
| # a new release in that case because one already exists! | ||
|
|
||
| release: | ||
| name: Create and populate release | ||
| name: Release bundle | ||
| if: contains(github.ref, 'refs/tags/') | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| if: contains(github.ref, 'refs/tags/') | ||
| env: | ||
| ZIP_NAME: ${{ needs.build.outputs.zip_name }} | ||
| GH_TOKEN: ${{ github.token }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Download font artefact files | ||
| uses: actions/download-artifact@v4 | ||
| - uses: actions/checkout@v6 | ||
| - name: Use font artifacts from CI | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| name: ${{ env.ZIP_NAME }} | ||
| path: ${{ env.ZIP_NAME }} | ||
| - name: Copy ARTICLE.en_us.html to artefact directory | ||
| - name: Copy ARTICLE.en_us.html to release directory | ||
| run: cp documentation/ARTICLE.en_us.html ${{ env.ZIP_NAME }}/ARTICLE.en_us.html | ||
| continue-on-error: true | ||
| - name: Copy OFL.txt to artefact directory | ||
| - name: Copy OFL.txt to release directory | ||
| run: cp OFL.txt ${{ env.ZIP_NAME }}/OFL.txt | ||
| - name: Remove proof/fontbakery stuff from release | ||
| - name: Remove proof/test outputs from release | ||
| run: rm -rf ${{ env.ZIP_NAME }}/out | ||
| - name: gen release file name | ||
| - name: Set release file name | ||
| shell: bash | ||
| run: echo "RELEASE_ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-${{github.ref_name}}" >> $GITHUB_ENV | ||
| - name: Create release bundle | ||
|
|
@@ -130,4 +140,3 @@ jobs: | |
| - name: Set release live | ||
| run: | | ||
| gh release edit ${{ github.ref_name }} --draft=false | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
permissions: write-allgrants this workflow broad write access to the repository and other resources. This is significantly more privilege than is required for building/testing and uploading artifacts, and it increases the blast radius if any step/action is compromised. Prefer the principle of least privilege (e.g. defaultcontents: read, and only addpages: write/id-token: writein the specific job/step that needs it).