This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
cbec8ca
commit 3f893db
Showing
49 changed files
with
12,331 additions
and
117 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### 🆕 New Features | ||
* none | ||
|
||
### 🛠️ Bug Fixes | ||
* none | ||
|
||
### 🔣 Dependencies | ||
* none | ||
|
||
### ‼️ Breaking Changes | ||
* none | ||
|
||
### 🔄 Other Changes | ||
* none |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
with: | ||
submodules: recursive | ||
token: ${{ secrets.SUBMODULE_TOKEN }} | ||
- name: Set up Node.js | ||
uses: actions/setup-node@main | ||
with: | ||
node-version: 'latest' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm install | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }} | ||
- name: Update local package.json version from release tag | ||
if: github.ref_type == 'tag' | ||
uses: BellCubeDev/update-package-version-by-release-tag@v2 | ||
with: | ||
version: ${{ github.ref_name }} | ||
keep-v: "false" # If set to "true", will not remove any 'v' prefix from the version number. | ||
ignore-semver-check: "false" # If set to "true", will not check if the version number is a valid semver version. | ||
- name: Build scripts | ||
run: npm run build | ||
- name: Generate modules | ||
run: npm run build:args | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: artifact | ||
path: | | ||
CHANGELOG.md | ||
rulesets | ||
dist |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/heads | ||
branches: | ||
- dev | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
|
||
jobs: | ||
debug: | ||
uses: ./.github/workflows/dev.yml | ||
secrets: inherit | ||
deploy: | ||
needs: debug | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@master | ||
with: | ||
name: artifact | ||
- name: Deploy Response | ||
uses: exuanbo/actions-deploy-gist@main | ||
with: | ||
token: ${{ secrets.GIST_TOKEN }} | ||
gist_id: 862db28df04be7523476d10b61b128f2 | ||
gist_description: " iRingo: 🌤 Weather β" | ||
file_path: dist/response.bundle.js |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Dev | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
with: | ||
submodules: recursive | ||
token: ${{ secrets.SUBMODULE_TOKEN }} | ||
ref: dev | ||
- name: Set up Node.js | ||
uses: actions/setup-node@main | ||
with: | ||
node-version: 'latest' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm install | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }} | ||
- name: Build | ||
run: npm run build:dev | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: artifact | ||
path: | | ||
CHANGELOG.md | ||
rulesets | ||
dist |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Draft | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/heads | ||
branches: | ||
- main | ||
|
||
permissions: | ||
actions: read | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
draft: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@master | ||
with: | ||
name: artifact | ||
- name: Publish Draft | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: CHANGELOG.md | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
rulesets/* | ||
dist/* | ||
draft: true |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Pre-Release | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+ | ||
- v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+ | ||
|
||
permissions: | ||
actions: read | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
pre-release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@master | ||
with: | ||
name: artifact | ||
- name: Publish Pre-Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: CHANGELOG.md | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
rulesets/* | ||
dist/* | ||
prerelease: true |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
|
||
permissions: | ||
actions: read | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@master | ||
with: | ||
name: artifact | ||
- name: Publish Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: CHANGELOG.md | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
rulesets/* | ||
dist/* | ||
make_latest: "true" |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "src/proto"] | ||
path = src/proto | ||
url = https://github.com/NSRingo/proto.git |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
registry=https://registry.npmjs.org/ | ||
@nsnanocat:registry=https://npm.pkg.github.com/ | ||
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### 🆕 New Features | ||
* `空气质量`增加`与昨日同时间对比`功能 | ||
* 为实现此功能,现在默认替换来自`和风天气`的`空气质量`数据 | ||
|
||
### 🔄 Other Changes | ||
* `util` 由 `submodule` 更改为 `package` |
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 |
---|---|---|
@@ -0,0 +1,138 @@ | ||
import { defineConfig } from "@iringo/arguments-builder"; | ||
|
||
export default defineConfig({ | ||
output: { | ||
surge: { | ||
path: "./dist/iRingo.Weather.sgmodule", | ||
transformEgern: { | ||
enable: true, | ||
path: "./dist/iRingo.Weather.yaml", | ||
}, | ||
}, | ||
loon: { | ||
path: "./dist/iRingo.Weather.plugin", | ||
}, | ||
customItems: [ | ||
{ | ||
path: "./dist/iRingo.Weather.snippet", | ||
template: "./template/quantumultx.handlebars", | ||
}, | ||
{ | ||
path: "./dist/iRingo.Weather.stoverride", | ||
template: "./template/stash.handlebars", | ||
}, | ||
{ | ||
path: "./dist/iRingo.Weather.srmodule", | ||
template: "./template/shadowrocket.handlebars", | ||
}, | ||
], | ||
dts: { | ||
isExported: true, | ||
path: "./src/types.d.ts", | ||
}, | ||
boxjsSettings: { | ||
path: "./template/boxjs.settings.json", | ||
scope: "@iRingo.Weather.Settings", | ||
}, | ||
}, | ||
args: [ | ||
{ | ||
key: "NextHour.Provider", | ||
name: "[未来一小时降水强度] 数据源", | ||
defaultValue: "ColorfulClouds", | ||
type: "string", | ||
options: [ | ||
{ key: "WeatherKit", label: "WeatherKit (不进行替换)" }, | ||
{ key: "ColorfulClouds", label: "彩云天气" }, | ||
{ key: "QWeather", label: "和风天气" }, | ||
], | ||
description: "始终会使用选定的数据源,填补无降水监测地区的数据。", | ||
}, | ||
{ | ||
key: "AQI.Provider", | ||
name: "[空气质量] 数据源", | ||
defaultValue: "ColorfulClouds", | ||
type: "string", | ||
options: [ | ||
{ key: "WeatherKit", label: "WeatherKit (不进行替换)" }, | ||
{ key: "ColorfulClouds", label: "彩云天气" }, | ||
{ key: "QWeather", label: "和风天气" }, | ||
{ key: "WAQI", label: "The World Air Quality Project" }, | ||
], | ||
description: "始终会使用选定的数据源,填补无空气质量监测地区的数据。", | ||
}, | ||
{ | ||
key: "AQI.ReplaceProviders", | ||
name: "[空气质量] 需要替换的供应商", | ||
defaultValue: ["QWeather"], | ||
type: "array", | ||
description: "选中的空气质量数据源会被替换。", | ||
options: [ | ||
{ key: "QWeather", label: "和风天气" }, | ||
{ key: "BreezoMeter", label: "BreezoMeter" }, | ||
{ key: "TWC", label: "The Weather Channel" }, | ||
], | ||
}, | ||
{ | ||
key: "AQI.Local.Scale", | ||
type: "string", | ||
name: "[空气质量] 本地替换算法", | ||
description: "本地替换时使用的算法", | ||
defaultValue: "WAQI_InstantCast", | ||
options: [ | ||
{ key: "NONE", label: "None (不进行替换)" }, | ||
{ key: "WAQI_InstantCast", label: "WAQI InstantCast" }, | ||
], | ||
}, | ||
{ | ||
key: "AQI.Local.ReplaceScales", | ||
type: "array", | ||
name: "[空气质量] 需要修改的标准", | ||
description: "选中的空气质量标准会被替换。请注意各国监测的污染物种类可能有所不同,转换算法或API未必适合当地。", | ||
defaultValue: ["HJ6332012"], | ||
options: [{ key: "HJ6332012", label: "中国 (HJ 633—2012)" }], | ||
}, | ||
{ | ||
key: "AQI.Local.ConvertUnits", | ||
name: "[空气质量] 转换污染物计量单位", | ||
defaultValue: false, | ||
type: "boolean", | ||
description: "将污染物数据替换为转换单位后的数据,方便对照转换后的标准。(不推荐。不同单位互转可能会损失精度,导致数值偏大)", | ||
}, | ||
{ | ||
key: "API.ColorfulClouds.Token", | ||
name: "[API] 彩云天气令牌", | ||
defaultValue: "", | ||
type: "string", | ||
placeholder: "123456789123456789abcdefghijklmnopqrstuv", | ||
description: "彩云天气 API 令牌", | ||
}, | ||
{ | ||
key: "API.QWeather.Host", | ||
name: "[API] 和风天气主机", | ||
defaultValue: "devapi.qweather.com", | ||
type: "string", | ||
description: "和风天气 API 使用的主机名", | ||
options: [ | ||
{ key: "devapi.qweather.com", label: "免费订阅 (devapi.qweather.com)" }, | ||
{ key: "api.qweather.com", label: "付费订阅 (api.qweather.com)" }, | ||
], | ||
}, | ||
{ | ||
key: "API.QWeather.Token", | ||
name: "[API] 和风天气令牌", | ||
defaultValue: "", | ||
type: "string", | ||
placeholder: "123456789123456789abcdefghijklmnopqrstuv", | ||
description: "和风天气 API 令牌", | ||
}, | ||
{ | ||
key: "API.WAQI.Token", | ||
name: "[API] WAQI 令牌", | ||
defaultValue: "", | ||
type: "string", | ||
placeholder: "123456789123456789abcdefghijklmnopqrstuv", | ||
description: "WAQI API 令牌,填写此字段将自动使用WAQI高级API", | ||
}, | ||
], | ||
}); |
Oops, something went wrong.