Skip to content

Commit

Permalink
✨ webdav备份
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Oct 27, 2022
1 parent 7401a54 commit 8cc8637
Show file tree
Hide file tree
Showing 31 changed files with 1,115 additions and 167 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
env:
CHROME_PEM: ${{ secrets.CHROME_PEM }}
run: |
mkdir dist
echo "$CHROME_PEM" > ./dist/scriptcat.pem
chmod 600 ./dist/scriptcat.pem
npm ci
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/packageRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
env:
CHROME_PEM: ${{ secrets.CHROME_PEM }}
run: |
mkdir dist
echo "$CHROME_PEM" > ./dist/scriptcat.pem
chmod 600 ./dist/scriptcat.pem
npm ci
Expand All @@ -56,8 +57,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/scriptcat.zip
asset_name: scriptcat.zip
asset_path: ./dist/scriptcat-${{ github.ref }}-chrome.zip
asset_name: scriptcat-${{ github.ref }}-chrome.zip
asset_content_type: application/zip

- name: Upload FireFox Release Asset zip
Expand All @@ -67,8 +68,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/scriptcat_firefox.zip
asset_name: scriptcat_firefox.zip
asset_path: ./dist/scriptcat-${{ github.ref }}-firefox.zip
asset_name: scriptcat-${{ github.ref }}-firefox.zip
asset_content_type: application/zip

- name: Upload Crx Release Asset zip
Expand All @@ -78,6 +79,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/scriptcat.crx
asset_name: scriptcat.crx
asset_path: ./dist/scriptcat-${{ github.ref }}-chrome.crx
asset_name: scriptcat-${{ github.ref }}-chrome.crx
asset_content_type: application/zip
8 changes: 5 additions & 3 deletions build/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ chrome
compression: "DEFLATE",
})
.pipe(
fs.createWriteStream(`./dist/${package.name}-chrome-${package.version}.zip`)
fs.createWriteStream(
`./dist/${package.name}-v${package.version}-chrome.zip`
)
);

firefox
Expand All @@ -102,7 +104,7 @@ firefox
})
.pipe(
fs.createWriteStream(
`./dist/${package.name}-firefox-${package.version}.zip`
`./dist/${package.name}-v${package.version}-firefox.zip`
)
);

Expand All @@ -116,7 +118,7 @@ crx
.then((crxFile) => crxFile.pack())
.then((crxBuffer) => {
fs.writeFileSync(
`./dist/${package.name}-chrome-${package.version}.crx`,
`./dist/${package.name}-v${package.version}-chrome.crx`,
crxBuffer
);
})
Expand Down
Loading

0 comments on commit 8cc8637

Please sign in to comment.