fix: test release flow

This commit is contained in:
molvqingtai 2024-09-28 12:46:54 +08:00
parent 663a5cecf9
commit b10e9dbb82
4 changed files with 56 additions and 39 deletions

View file

@ -39,6 +39,6 @@ jobs:
version: latest
- run: pnpm install --ignore-scripts
- run: pnpm wxt prepare
- run: pnpm semantic-release
- run: pnpm semantic-release --debug
env:
GH_TOKEN: ${{ secrets.WEB_CHAT_GITHUB_TOKEN }}

View file

@ -1,37 +0,0 @@
{
"branches": [
"master"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "pnpm run pack && echo \"current files:\" && ls -a -d */"
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": ".output/web-chat-1.0.24-chrome.zip",
"label": "Chrome Extension Installation Package"
}
],
"labels": [
"release"
]
}
],
"@semantic-release/git"
]
}

54
.releaserc.mjs Normal file
View file

@ -0,0 +1,54 @@
/**
* @type {import('semantic-release').GlobalConfig}
*/
export default {
branches: ['master'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
[
'@semantic-release/npm',
{
npmPublish: false
}
],
[
'@semantic-release/exec',
{
prepareCmd: 'pnpm run pack'
}
],
/**
* Because assets.path does not support environment variables, a copy of the file without the version number is needed.
* @see https://github.com/semantic-release/github/issues/274
* */
[
'@semantic-release/exec',
{
prepareCmd: 'cp .output/web-chat-${nextRelease.version}-chrome.zip .output/web-chat-chrome.zip'
}
],
[
'@semantic-release/exec',
{
prepareCmd: 'cp .output/web-chat-${nextRelease.version}-firefox.zip .output/web-chat-firefox.zip'
}
],
[
'@semantic-release/github',
{
assets: [
{
path: '.output/web-chat-chrome.zip'
},
{
path: '.output/web-chat-firefox.zip'
}
],
labels: ['release']
}
],
'@semantic-release/git'
]
}

View file

@ -12,8 +12,8 @@ export default defineConfig({
startUrls: ['https://www.example.com/']
},
manifest: {
permissions: ['storage'],
name: displayName,
permissions: ['storage'],
homepage_url: homepage,
icons: {
'16': 'logo.png',