Skip to content

Commit f0537a1

Browse files
committed
chore: updater
1 parent f5eab44 commit f0537a1

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,10 @@ jobs:
9999

100100
steps:
101101
- uses: actions/checkout@v2
102-
103-
- name: Setup node
104-
uses: actions/setup-node@v1
105-
with:
106-
node-version: 16
107-
- run: yarn add -D node-fetch @actions/github
102+
- run: yarn
108103
- run: yarn updater
109104
env:
110105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111-
# refs/tags/v0.0.0 -> 0.0.0
112-
TAG: ${GITHUB_REF:11}
113106

114107
- name: Deploy install.json
115108
uses: peaceiris/actions-gh-pages@v3

scripts/updater.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import fs from 'fs';
55
import { resolveUpdateLog } from './updatelog.mjs';
66

77
const token = process.env.GITHUB_TOKEN;
8-
const version = process.env.TAG || '0.0.0';
98

109
async function updater() {
1110
if (!token) {
@@ -33,10 +32,9 @@ async function updater() {
3332
});
3433

3534
const updateData = {
36-
name: tag.name,
35+
version: tag.name,
3736
notes: resolveUpdateLog(tag.name), // use UPDATE_LOG.md
3837
pub_date: new Date().toISOString(),
39-
version,
4038
platforms: {
4139
win64: { signature: '', url: '' }, // compatible with older formats
4240
linux: { signature: '', url: '' }, // compatible with older formats
@@ -82,6 +80,7 @@ async function updater() {
8280
await setAsset(asset, /.AppImage.tar.gz/, ['linux', 'linux-x86_64']);
8381
});
8482
await Promise.allSettled(promises);
83+
8584
if (!fs.existsSync('updater')) {
8685
fs.mkdirSync('updater');
8786
}

0 commit comments

Comments
 (0)