Skip to content

Commit 355d33d

Browse files
committed
release new version
1 parent 664799c commit 355d33d

3 files changed

Lines changed: 87 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build plugin
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- "*" # Push events to matching any tag format, i.e. 1.0, 20.15.10
8+
9+
env:
10+
PLUGIN_NAME: obsidian-image-toolkit
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: "14.x" # You might need to adjust this value to your own version
22+
- name: Build
23+
id: build
24+
run: |
25+
npm install -g yarn
26+
yarn
27+
yarn run build
28+
mkdir ${{ env.PLUGIN_NAME }}
29+
cp main.js manifest.json ${{ env.PLUGIN_NAME }}
30+
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
31+
ls
32+
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
33+
- name: Create Release
34+
id: create_release
35+
uses: actions/create-release@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
VERSION: ${{ github.ref }}
39+
with:
40+
tag_name: ${{ github.ref }}
41+
release_name: ${{ github.ref }}
42+
draft: false
43+
prerelease: false
44+
- name: Upload zip file
45+
id: upload-zip
46+
uses: actions/upload-release-asset@v1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
with:
50+
upload_url: ${{ steps.create_release.outputs.upload_url }}
51+
asset_path: ./${{ env.PLUGIN_NAME }}.zip
52+
asset_name: ${{ env.PLUGIN_NAME }}-${{ steps.build.outputs.tag_name }}.zip
53+
asset_content_type: application/zip
54+
- name: Upload main.js
55+
id: upload-main
56+
uses: actions/upload-release-asset@v1
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
with:
60+
upload_url: ${{ steps.create_release.outputs.upload_url }}
61+
asset_path: ./main.js
62+
asset_name: main.js
63+
asset_content_type: text/javascript
64+
- name: Upload manifest.json
65+
id: upload-manifest
66+
uses: actions/upload-release-asset@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ steps.create_release.outputs.upload_url }}
71+
asset_path: ./manifest.json
72+
asset_name: manifest.json
73+
asset_content_type: application/json
74+
- name: Upload styles.css
75+
id: upload-styles
76+
uses: actions/upload-release-asset@v1
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
with:
80+
upload_url: ${{ steps.create_release.outputs.upload_url }}
81+
asset_path: ./styles.css
82+
asset_name: styles.css
83+
asset_content_type: text/css
84+

README_cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<h1 align="center">Obsidian Image Toolkit</h1>
1+
<h1 align="center">Image Toolkit</h1>
22

33
<p align="center">
44
<img alt="Release version" src="https://img.shields.io/github/v/release/sissilab/obsidian-image-toolkit?style=for-the-badge">
55
<img alt="Download count" src="https://img.shields.io/github/downloads/sissilab/obsidian-image-toolkit/total?style=for-the-badge">
66
</p>
77

88
<p align="center">
9-
<span>Obsidian Image Toolkit 是一款 Obsidian 的第三方插件,它提供了一些有关图片查看操作的小功能。</span>
9+
<span>Image Toolkit 是一款 Obsidian 的第三方插件,它提供了一些有关图片查看操作的小功能。</span>
1010
<br/>
1111
<a href="/README_cn.md">简体中文</a>
1212
·

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Image Toolkit",
44
"version": "1.4.3",
55
"minAppVersion": "1.8.7",
6-
"description": "This plugin provides some image viewing toolkit.",
6+
"description": "Click images to preview with zoom, move, rotate, flip, invert, and copy.",
77
"author": "Xiangru",
88
"authorUrl": "https://github.com/sissilab",
99
"isDesktopOnly": true

0 commit comments

Comments
 (0)