Skip to content

Commit

Permalink
Use generated previews in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Liv Asch committed May 23, 2024
1 parent 0dc6425 commit 9d0bf30
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Generate PNGs
run: npm run generate-pngs

- name: Generate preview
run: npm run generate-preview -- --only-updates
- name: Generate previews
run: npm run generate-previews
if: ${{ steps.find-changes.outputs.hasSvgChanges == 'true' }}

- name: Create tar archives
Expand All @@ -53,4 +53,4 @@ jobs:
files: |
tar/**
zip/**
preview.png
previews/**
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ of the emojis, were all created by [Volpeon](https://volpeon.ink/emojis/).
Blobbee was the first of these packs, and was originally designed to just be
pride flag bees but was then expanded to become a full set.

![A grid of bee emojis making various expressions.](./previews/preview-blobbee.png)
![A grid of bee emojis making various expressions.](https://github.com/olivvybee/emojis/releases/latest/download/preview-blobbee.png)

### Neobread

Neobread started as a single emoji, `neobread_woozy`, inspired by
[a fedi post](https://meow.woem.cat/notes/9qq5pizgf0bff23a), which I then
expanded to contain the same emojis as blobbee due to popular demand.

![A grid of bread emojis making various expressions.](./previews/preview-neobread.png)
![A grid of bread emojis making various expressions.](https://github.com/olivvybee/emojis/releases/latest/download/preview-neobread.png)

### NeoDLR

Expand All @@ -34,21 +34,21 @@ like
[DLR rolling stock](https://en.wikipedia.org/wiki/Docklands_Light_Railway_rolling_stock),
also inspired by [a fedi post](https://meow.woem.cat/notes/9tkftowim4l7k08p).

![A grid of red and black train emojis making various expressions.](./previews/preview-neoDLR.png)
![A grid of red and black train emojis making various expressions.](https://github.com/olivvybee/emojis/releases/latest/download/preview-neoDLR.png)

### Neocat

Neocat was originally created by [Volpeon](https://volpeon.ink/emojis/). These
are just a few additions I made while creating the other sets.

![A grid of cat emojis making various expressions.](./previews/preview-neocat.png)
![A grid of cat emojis making various expressions.](https://github.com/olivvybee/emojis/releases/latest/download/preview-neocat.png)

### Neofox

Neofox was originally created by [Volpeon](https://volpeon.ink/emojis/). These
are just a few additions I made while creating the other sets.

![A grid of fox emojis making various expressions.](./previews/preview-neofox.png)
![A grid of fox emojis making various expressions.](https://github.com/olivvybee/emojis/releases/latest/download/preview-neofox.png)

### Fox

Expand All @@ -57,7 +57,7 @@ Fox is based on the
and started with `fox_plead_collar` based on
[a fedi post](https://fox.nexus/@theresnotime/112418372868714476).

![A grid of fox emojis making various expressions.](./previews/preview-fox.png)
![A grid of fox emojis making various expressions.](https://github.com/olivvybee/emojis/releases/latest/download/preview-fox.png)

## Adding to a fedi instance

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"create-zips": "./scripts/create-zip-archives.sh",
"generate-meta": "tsx ./scripts/generateMetaJson.ts",
"find-changes": "tsx ./scripts/findChanges.ts",
"generate-preview": "tsx ./scripts/generatePreview.ts"
"generate-previews": "tsx ./scripts/generatePreviews.ts"
},
"license": "MIT",
"dependencies": {
Expand Down
9 changes: 3 additions & 6 deletions scripts/findChanges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ if (!GITHUB_REF) {
}

const tagName = GITHUB_REF.replace('refs/tags/', '');
const normalisedTagName = tagName.split('/').join('-');

const repoUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}`;
const previewUrl = `${repoUrl}/releases/download/${tagName}/preview.png`;
const previewUrl = `${repoUrl}/releases/download/${tagName}/preview-updates-${normalisedTagName}.png`;

enum ChangeType {
added = 'Added',
Expand Down Expand Up @@ -117,11 +118,7 @@ const run = async () => {
return;
}

const normalisedRef = GITHUB_REF.replace('refs/tags/', '')
.split('/')
.join('-');

const changesDir = path.resolve('.', `updates-${normalisedRef}`);
const changesDir = path.resolve('.', `updates-${normalisedTagName}`);
fs.mkdirSync(changesDir, { recursive: true });

changedSvgs.forEach((filePath) => {
Expand Down
File renamed without changes.

0 comments on commit 9d0bf30

Please sign in to comment.