Fix: Dart archive page CROS and downloads (#450) #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile Archive JS | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**/download_archive.dart.js" | |
permissions: | |
contents: write | |
jobs: | |
compile_archive_js: | |
if: ${{ github.actor.login != 'cfug-dev' && | |
github.repository == 'cfug/dart.cn' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | |
with: | |
submodules: recursive | |
token: ${{ secrets.CFUG_DEV_TOKEN }} | |
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 | |
- name: Build Dart archives downloading JS | |
run: > | |
bash tool/get-dart/archive/compile.sh | |
git add src/content/assets/js/get-dart/download_archive.dart.js | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.CFUG_DEV_PGP }} | |
passphrase: ${{ secrets.CFUG_DEV_PGP_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Commit files | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "[sync] Update download_archive.dart.js" | |
commit_author: "CFUG Dev Team <[email protected]>" | |
commit_user_name: "cfug-dev" | |
commit_user_email: "[email protected]" |