Skip to content

Commit

Permalink
Include oxipng in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Dec 12, 2023
1 parent e3af773 commit ad61bcb
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
MDBOOK_TOC_VERSION: "0.13.0"
MDBOOK_ADMONISH_VERSION: "1.10.1"
MDBOOK_BIN: "/tmp/mdbook-bin"
OXIPNG_VERSION: "9.0.0"

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down Expand Up @@ -104,4 +105,31 @@ jobs:
# with:
# author_name: 'Godot-Rust Automation'
# author_email: '[email protected]'
# message: 'Auto-apply license headers'
# message: 'Auto-apply license headers'


oxipng:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: "Run oxipng to reduce PNG sizes"
run: |
wget https://github.com/shssoichiro/oxipng/releases/download/v${OXIPNG_VERSION}/oxipng-${OXIPNG_VERSION}-x86_64-unknown-linux-musl.tar.gz \
-O /tmp/oxipng.tar.gz
tar -xvzf /tmp/oxipng.tar.gz -C /tmp
mv /tmp/oxipng-${OXIPNG_VERSION}-x86_64-unknown-linux-musl/oxipng ./oxipng
chmod +x ./oxipng
./oxipng --version
./oxipng --strip safe --alpha -r src
- name: "Commit changes"
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
author_name: 'Godot-Rust Automation'
author_email: '[email protected]'
message: 'Auto-reduce PNG sizes'

0 comments on commit ad61bcb

Please sign in to comment.