-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
WoLeo-Z
committed
Aug 8, 2023
1 parent
4fa128f
commit cabcdd6
Showing
14 changed files
with
17 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ name: Publish | |
|
||
on: | ||
release: | ||
types: | ||
- published | ||
types: | ||
- published | ||
|
||
workflow_dispatch: | ||
|
||
|
@@ -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 | ||
|
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains 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
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)" | ||
} |