Build packs #53
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: Build packs | |
| on: | |
| schedule: | |
| - cron: "0 0 1 * *" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install pip packages | |
| run: pip install -r requirements.txt | |
| - name: Install Cargo | |
| run: which cargo || sudo apt-get install -y cargo | |
| - name: Set up Cargo cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install oxipng | |
| run: which oxipng || cargo install oxipng | |
| - name: Install ImageMagick | |
| run: sudo apt-get -y install imagemagick | |
| - name: Build packs | |
| run: | | |
| for builder in build_*.py; do | |
| python3 $builder | |
| done | |
| - name: Rename packs and create zip | |
| run: | | |
| CURRENT_DATE=$(date +'%Y-%m-%d') | |
| echo "CURRENT_DATE=$CURRENT_DATE" >> $GITHUB_ENV | |
| for pack in *.iconpack; do | |
| mv $pack $(echo $pack | sed "s|\.iconpack|-$CURRENT_DATE.iconpack|g") | |
| done | |
| zip "_all-$CURRENT_DATE.zip" *.iconpack | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "Release ${{ env.CURRENT_DATE }}" | |
| tag_name: "${{ env.CURRENT_DATE }}" | |
| files: | | |
| *.iconpack | |
| _all-${{ env.CURRENT_DATE }}.zip | |
| token: "${{ secrets.TOKEN }}" | |
| make_latest: true |