Removed outdated images #934
This file contains hidden or 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 for Chrome' | |
| on: | |
| push: | |
| branches: [ 'main' ] | |
| pull_request: | |
| branches: [ 'main' ] | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Checkout Repository' | |
| uses: actions/checkout@v7 | |
| - name: 'Extract Version' | |
| id: get_version | |
| run: | | |
| VERSION=$(jq -r '.version' src/main/manifest.json) | |
| echo "VERSION=$VERSION" >> "$GITHUB_ENV" | |
| - name: 'Stage Build Output' | |
| run: | | |
| rm -rf dist | |
| cp -r src/main dist | |
| - name: 'Cache NPM Downloads' | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.npm | |
| key: npm-tools-${{ runner.os }}-htmlminifierterser7-terser5-cleancss5-svgo3 | |
| - name: 'Install Minifiers' | |
| run: | | |
| npm install -g \ | |
| html-minifier-terser@7 \ | |
| terser@5 \ | |
| clean-css-cli@5 \ | |
| svgo@3 | |
| - name: 'Minify HTML, CSS, JS, JSON' | |
| run: | | |
| find dist -name '*.html' -exec html-minifier-terser \ | |
| --collapse-whitespace --remove-comments \ | |
| --minify-css true --minify-js true -o {} {} \; | |
| find dist -name '*.css' -exec cleancss -o {} {} \; | |
| find dist -name '*.js' -exec terser {} -c -m -o {} \; | |
| find dist -name '*.json' -exec sh -c 'jq -c . "$1" > "$1.tmp" && mv "$1.tmp" "$1"' _ {} \; | |
| - name: 'Upload Artifact' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Osprey-${{ env.VERSION }}-chrome | |
| path: dist | |
| compression-level: 9 | |
| if-no-files-found: error |