Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
WoLeo-Z committed Aug 8, 2023
1 parent 4fa128f commit cabcdd6
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 22 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Publish

on:
release:
types:
- published
types:
- published

workflow_dispatch:

Expand All @@ -13,44 +13,39 @@ jobs:
# Clone repo
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: master
# Install Node.js
# Install Node.js
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "12.x"
registry-url: https://registry.npmjs.org/

# rawimg/ 作为原始图片存储,webpimg/ 作为压缩图片存储处,最后合并。
# 安装相关插件,转换图片。
- name: Install & Convert

- name: Convert WebP
run: |
#npm install -g [email protected]
#cwebp-batch --in rawimg --out webpimg -q 75 -quiet
npx [email protected] --in rawimg --out webpimg -q 75 -quiet
mv webpimg/*.webp rawimg/
npx [email protected] --in img --out webpimg -q 75 -quiet
mv webpimg/*.webp img/
git config --global user.email "[email protected]"
git config --global user.name "WoLeo-Z"
git add . && git commit -m "Convert to WebP"
# Publish to npm
- name: Publish Package
run: |
npm version patch
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

# 删除 rawimg/ 和 webpimg/ 下的所有文件

- name: Clean
run: |
rm -rf webpimg/*
rm -rf rawimg/*
rm -rf img/*
touch webpimg/.gitkeep
touch rawimg/.gitkeep
touch img/.gitkeep
- name: Push
run: |
git add -A
Expand Down
File renamed without changes.
Binary file added img/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/avatar.webp
Binary file not shown.
Binary file added img/bg1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/bg1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/bg2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/bg3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/bg3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icon-32x32.ico
Binary file not shown.
Binary file added img/icon.ico
Binary file not shown.
Binary file added img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icon.webp
Binary file not shown.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wolzimg",
"version": "0.0.1",
"description": "Somewhere to save the file from @WoLeo-Z",
"author": "WoL(@WoLeo-Z)"
"name": "wolzimg",
"version": "0.0.0",
"description": "Somewhere to save the file from @WoLeo-Z",
"author": "WoL(@WoLeo-Z)"
}

0 comments on commit cabcdd6

Please sign in to comment.