Skip to content

Conditionally run generate-preview based on find-changes #12

Conditionally run generate-preview based on find-changes

Conditionally run generate-preview based on find-changes #12

Workflow file for this run

name: Create Release
on:
push:
tags:
- '*'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Find changes
id: find-changes
run: npm run find-changes
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REF: ${{ github.ref_name }}
- name: Generate PNGs
run: npm run generate-pngs
- name: Generate preview
run: npm run generate-preview
if: ${{ steps.find-changes.outputs.hasSvgChanges }}
- name: Create tar archives
run: npm run create-tars
- name: Generate meta.json
run: npm run generate-meta
- name: Generate hi-res PNGs
run: npm run generate-pngs -- --size 2048
- name: Create zip archives
run: npm run create-zips
# - name: Create release
# uses: softprops/action-gh-release@v2
# with:
# files: |
# tar/**
# zip/**