Compare commits
6 Commits
main
...
semantic-release
| Author | SHA1 | Date | |
|---|---|---|---|
| d682e0d86e | |||
| e7176d0d69 | |||
| 491fac772f | |||
| 8afc39be7a | |||
| 52291ef1bb | |||
| 6f1bd6a681 |
@@ -1,22 +0,0 @@
|
|||||||
name: "Upload zip-archive"
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
zip-archive:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Create zip including submodules
|
|
||||||
run: |
|
|
||||||
cd ..
|
|
||||||
zip ${{ github.event.repository.name }}/${{ github.event.repository.name }}-${{ github.ref_name }}.zip ${{ github.event.repository.name }} -r
|
|
||||||
- name: Upload zip to release
|
|
||||||
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
${{ github.event.repository.name }}-${{ github.ref_name }}.zip
|
|
||||||
+114
-25
@@ -1,16 +1,79 @@
|
|||||||
name: "Publish Tauri App"
|
name: "Publish Tauri App"
|
||||||
on:
|
on:
|
||||||
release:
|
workflow_dispatch:
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
semantic-release:
|
||||||
|
name: Trigger release
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.vars.outputs.tag }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
actions: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||||
|
with:
|
||||||
|
node-version-file: ".node-version"
|
||||||
|
package-manager-cache: false
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run semantic-release
|
||||||
|
run: npm run semantic-release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get version from tag
|
||||||
|
id: vars
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe --tags --abbrev=0)
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
zip-archive:
|
||||||
|
needs: semantic-release
|
||||||
|
env:
|
||||||
|
TAURI_VERSION: ${{ needs.semantic-release.outputs.version }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
ref: ${{ env.TAURI_VERSION }}
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: true
|
||||||
|
- name: Create zip including submodules
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
zip ${{ github.event.repository.name }}/${{ github.event.repository.name }}-${{ env.TAURI_VERSION }}.zip ${{ github.event.repository.name }} -r
|
||||||
|
- name: Upload zip to release
|
||||||
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.TAURI_VERSION }}
|
||||||
|
files: |
|
||||||
|
${{ github.event.repository.name }}-${{ env.TAURI_VERSION }}.zip
|
||||||
|
|
||||||
# Windows-x86_64
|
# Windows-x86_64
|
||||||
windows-x86_64:
|
windows-x86_64:
|
||||||
|
needs: semantic-release
|
||||||
|
env:
|
||||||
|
TAURI_VERSION: ${{ needs.semantic-release.outputs.version }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
|
ref: ${{ env.TAURI_VERSION }}
|
||||||
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
||||||
@@ -30,26 +93,25 @@ jobs:
|
|||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
- name: Get app version (windows)
|
|
||||||
run: |
|
|
||||||
$json = (Get-Content "src-tauri\tauri.conf.json" -Raw) | ConvertFrom-Json
|
|
||||||
$version = $json.version
|
|
||||||
echo "Version: ${version}"
|
|
||||||
echo "TAURI_VERSION=${version}" >> $Env:GITHUB_ENV
|
|
||||||
echo "${Env:TAURI_VERSION}"
|
|
||||||
shell: pwsh
|
|
||||||
- name: Move msi
|
- name: Move msi
|
||||||
run: Move-Item "src-tauri\target\release\bundle\msi\Cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi"
|
run: |
|
||||||
|
$version = $env:TAURI_VERSION.TrimStart('v')
|
||||||
|
Move-Item "src-tauri\target\release\bundle\msi\Cinny_${version}_x64_en-US.msi" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi"
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Move msi.zip
|
- name: Move msi.zip
|
||||||
run: Move-Item "src-tauri\target\release\bundle\msi\Cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip"
|
run: |
|
||||||
|
$version = $env:TAURI_VERSION.TrimStart('v')
|
||||||
|
Move-Item "src-tauri\target\release\bundle\msi\Cinny_${version}_x64_en-US.msi.zip" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip"
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Move msi.zip.sig
|
- name: Move msi.zip.sig
|
||||||
run: Move-Item "src-tauri\target\release\bundle\msi\Cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip.sig" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig"
|
run: |
|
||||||
|
$version = $env:TAURI_VERSION.TrimStart('v')
|
||||||
|
Move-Item "src-tauri\target\release\bundle\msi\Cinny_${version}_x64_en-US.msi.zip.sig" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig"
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Upload tagged release
|
- name: Upload tagged release
|
||||||
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
||||||
with:
|
with:
|
||||||
|
tag_name: ${{ env.TAURI_VERSION }}
|
||||||
files: |
|
files: |
|
||||||
src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi
|
src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi
|
||||||
src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi.zip
|
src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi.zip
|
||||||
@@ -57,11 +119,16 @@ jobs:
|
|||||||
|
|
||||||
# Linux-x86_64
|
# Linux-x86_64
|
||||||
linux-x86_64:
|
linux-x86_64:
|
||||||
|
needs: semantic-release
|
||||||
|
env:
|
||||||
|
TAURI_VERSION: ${{ needs.semantic-release.outputs.version }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
|
ref: ${{ env.TAURI_VERSION }}
|
||||||
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
||||||
@@ -85,20 +152,30 @@ jobs:
|
|||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
- name: Get app version
|
|
||||||
id: vars
|
|
||||||
run: echo "tag=$(jq .version src-tauri/tauri.conf.json | tr -d '"')" >> $GITHUB_OUTPUT
|
|
||||||
- name: Move deb
|
- name: Move deb
|
||||||
run: mv "src-tauri/target/release/bundle/deb/Cinny_${{ steps.vars.outputs.tag }}_amd64.deb" "src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb"
|
run: |
|
||||||
|
VERSION="${{ env.TAURI_VERSION }}"
|
||||||
|
VERSION="${VERSION#v}"
|
||||||
|
mv "src-tauri/target/release/bundle/deb/Cinny_${VERSION}_amd64.deb" "src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb"
|
||||||
- name: Move AppImage
|
- name: Move AppImage
|
||||||
run: mv "src-tauri/target/release/bundle/appimage/Cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage"
|
run: |
|
||||||
|
VERSION="${{ env.TAURI_VERSION }}"
|
||||||
|
VERSION="${VERSION#v}"
|
||||||
|
mv "src-tauri/target/release/bundle/appimage/Cinny_${VERSION}_amd64.AppImage" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage"
|
||||||
- name: Move AppImage.tar.gz
|
- name: Move AppImage.tar.gz
|
||||||
run: mv "src-tauri/target/release/bundle/appimage/Cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz"
|
run: |
|
||||||
|
VERSION="${{ env.TAURI_VERSION }}"
|
||||||
|
VERSION="${VERSION#v}"
|
||||||
|
mv "src-tauri/target/release/bundle/appimage/Cinny_${VERSION}_amd64.AppImage.tar.gz" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz"
|
||||||
- name: Move AppImage.tar.gz.sig
|
- name: Move AppImage.tar.gz.sig
|
||||||
run: mv "src-tauri/target/release/bundle/appimage/Cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz.sig" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig"
|
run: |
|
||||||
|
VERSION="${{ env.TAURI_VERSION }}"
|
||||||
|
VERSION="${VERSION#v}"
|
||||||
|
mv "src-tauri/target/release/bundle/appimage/Cinny_${VERSION}_amd64.AppImage.tar.gz.sig" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig"
|
||||||
- name: Upload tagged release
|
- name: Upload tagged release
|
||||||
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
||||||
with:
|
with:
|
||||||
|
tag_name: ${{ env.TAURI_VERSION }}
|
||||||
files: |
|
files: |
|
||||||
src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb
|
src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb
|
||||||
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage
|
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage
|
||||||
@@ -107,11 +184,16 @@ jobs:
|
|||||||
|
|
||||||
# macos-universal
|
# macos-universal
|
||||||
macos-universal:
|
macos-universal:
|
||||||
|
needs: semantic-release
|
||||||
|
env:
|
||||||
|
TAURI_VERSION: ${{ needs.semantic-release.outputs.version }}
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
|
ref: ${{ env.TAURI_VERSION }}
|
||||||
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
||||||
@@ -135,11 +217,11 @@ jobs:
|
|||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
with:
|
with:
|
||||||
args: "--target universal-apple-darwin"
|
args: "--target universal-apple-darwin"
|
||||||
- name: Get app version
|
|
||||||
id: vars
|
|
||||||
run: echo "tag=$(jq .version src-tauri/tauri.conf.json | tr -d '"')" >> $GITHUB_OUTPUT
|
|
||||||
- name: Move dmg
|
- name: Move dmg
|
||||||
run: mv "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_${{ steps.vars.outputs.tag }}_universal.dmg" "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg"
|
run: |
|
||||||
|
VERSION="${{ env.TAURI_VERSION }}"
|
||||||
|
VERSION="${VERSION#v}"
|
||||||
|
mv "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_${VERSION}_universal.dmg" "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg"
|
||||||
- name: Move app.tar.gz
|
- name: Move app.tar.gz
|
||||||
run: mv "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz"
|
run: mv "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz"
|
||||||
- name: Move app.tar.gz.sig
|
- name: Move app.tar.gz.sig
|
||||||
@@ -147,6 +229,7 @@ jobs:
|
|||||||
- name: Upload tagged release
|
- name: Upload tagged release
|
||||||
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
|
||||||
with:
|
with:
|
||||||
|
tag_name: ${{ env.TAURI_VERSION }}
|
||||||
files: |
|
files: |
|
||||||
src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg
|
src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg
|
||||||
src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz
|
src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz
|
||||||
@@ -155,11 +238,17 @@ jobs:
|
|||||||
# Upload release.json
|
# Upload release.json
|
||||||
release-update:
|
release-update:
|
||||||
if: always()
|
if: always()
|
||||||
needs: [windows-x86_64, linux-x86_64, macos-universal]
|
needs: [windows-x86_64, linux-x86_64, macos-universal, semantic-release]
|
||||||
|
env:
|
||||||
|
TAURI_VERSION: ${{ needs.semantic-release.outputs.version }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
ref: ${{ env.TAURI_VERSION }}
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: true
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Run release.json
|
- name: Run release.json
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# These are commented until we enable lint and typecheck
|
||||||
|
# npx tsc -p tsconfig.json --noEmit
|
||||||
|
# npx lint-staged
|
||||||
Generated
+7623
-1
File diff suppressed because it is too large
Load Diff
+53
-2
@@ -8,7 +8,52 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"tauri": "cp config.json cinny/ && tauri",
|
"tauri": "cp config.json cinny/ && tauri",
|
||||||
"release": "node scripts/release.mjs"
|
"release": "node scripts/release.mjs",
|
||||||
|
"lint": "npm run check:eslint && npm run check:prettier",
|
||||||
|
"check:eslint": "eslint src/*",
|
||||||
|
"check:prettier": "prettier --check .",
|
||||||
|
"fix:prettier": "prettier --write .",
|
||||||
|
"typecheck": "tsc --noEmit",
|
||||||
|
"prepare": "husky install",
|
||||||
|
"commit": "git-cz",
|
||||||
|
"semantic-release": "semantic-release"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{ts,tsx,js,jsx}": "eslint",
|
||||||
|
"*": "prettier --ignore-unknown --write"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"commitizen": {
|
||||||
|
"path": "./node_modules/cz-conventional-changelog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"release": {
|
||||||
|
"branches": [
|
||||||
|
"main"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"prepareCmd": "node scripts/update-version.mjs ${nextRelease.version}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
"package.json",
|
||||||
|
"package-lock.json",
|
||||||
|
"src-tauri/Cargo.toml",
|
||||||
|
"src-tauri/tauri.conf.json"
|
||||||
|
],
|
||||||
|
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/github"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "Ajay Bura",
|
"author": "Ajay Bura",
|
||||||
@@ -28,7 +73,13 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/github": "6.0.0",
|
"@actions/github": "6.0.0",
|
||||||
|
"@semantic-release/exec": "7.1.0",
|
||||||
|
"@semantic-release/git": "10.0.1",
|
||||||
"@tauri-apps/cli": "2.7.1",
|
"@tauri-apps/cli": "2.7.1",
|
||||||
"node-fetch": "3.3.2"
|
"cz-conventional-changelog": "3.3.0",
|
||||||
|
"husky": "9.1.7",
|
||||||
|
"lint-staged": "16.3.2",
|
||||||
|
"node-fetch": "3.3.2",
|
||||||
|
"semantic-release": "25.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
import fs from "fs";
|
||||||
|
import path from "path";
|
||||||
|
import { execSync } from "child_process";
|
||||||
|
|
||||||
|
const version = process.argv[2];
|
||||||
|
|
||||||
|
if (!version) {
|
||||||
|
console.error("Missing version");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`Preparing release ${version}`);
|
||||||
|
|
||||||
|
// 1. Update npm versions
|
||||||
|
execSync(`npm version ${version} --no-git-tag-version`, {
|
||||||
|
stdio: "inherit"
|
||||||
|
});
|
||||||
|
console.log(`Updated package.json and package-lock.json → ${version}`);
|
||||||
|
|
||||||
|
// 2. Update Cargo.toml
|
||||||
|
const cargoToml = "src-tauri/Cargo.toml";
|
||||||
|
let cargoContent = fs.readFileSync(cargoToml, "utf8");
|
||||||
|
|
||||||
|
cargoContent = cargoContent.replace(
|
||||||
|
/^version\s*=\s*".*"/m,
|
||||||
|
`version = "${version}"`
|
||||||
|
);
|
||||||
|
|
||||||
|
fs.writeFileSync(cargoToml, cargoContent);
|
||||||
|
console.log(`Updated ${cargoToml} → ${version}`);
|
||||||
|
|
||||||
|
// 3. Update tauri.conf.json
|
||||||
|
const tauriConfigPath = "src-tauri/tauri.conf.json";
|
||||||
|
const tauriConfig = JSON.parse(fs.readFileSync(tauriConfigPath));
|
||||||
|
|
||||||
|
tauriConfig.version = version;
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
tauriConfigPath,
|
||||||
|
JSON.stringify(tauriConfig, null, 2) + "\n"
|
||||||
|
);
|
||||||
|
console.log(`Updated ${tauriConfigPath} → ${version}`);
|
||||||
|
|
||||||
|
// 4. Update Cinny web submodule to latest tag
|
||||||
|
console.log("Updating cinny web submodule");
|
||||||
|
|
||||||
|
execSync("git submodule update --init --recursive", { stdio: "inherit" });
|
||||||
|
|
||||||
|
execSync("cd cinny && git fetch --tags", { stdio: "inherit" });
|
||||||
|
|
||||||
|
const latestTag = execSync(
|
||||||
|
"cd cinny && git describe --tags $(git rev-list --tags --max-count=1)"
|
||||||
|
)
|
||||||
|
.toString()
|
||||||
|
.trim();
|
||||||
|
|
||||||
|
console.log(`Latest cinny tag: ${latestTag}`);
|
||||||
|
|
||||||
|
execSync(`cd cinny && git checkout ${latestTag}`, { stdio: "inherit" });
|
||||||
|
|
||||||
|
execSync("git add cinny", { stdio: "inherit" });
|
||||||
|
|
||||||
|
console.log("Release preparation complete");
|
||||||
Reference in New Issue
Block a user