fix?
This commit is contained in:
parent
425dd11b25
commit
90395c8ba4
2 changed files with 18 additions and 45 deletions
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
|
|
@ -49,23 +49,13 @@ jobs:
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Determine Version
|
- name: Get version from tauri.conf.json
|
||||||
id: determine-version
|
id: get-version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
APP_VERSION=""
|
VERSION=$(grep -o '"version": "[^"]*"' src-tauri/tauri.conf.json | cut -d'"' -f4)
|
||||||
REF="${{ inputs.ref }}"
|
echo "Application version from tauri.conf.json: $VERSION"
|
||||||
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
if [[ "$REF" == refs/tags/v* ]]; then
|
|
||||||
APP_VERSION="${REF#refs/tags/v}"
|
|
||||||
echo "Release version determined from tag: $APP_VERSION"
|
|
||||||
else
|
|
||||||
DESCRIBE=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
|
|
||||||
APP_VERSION="${DESCRIBE#v}"
|
|
||||||
echo "CI version determined from latest tag or fallback: $APP_VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "version=${APP_VERSION}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- uses: oven-sh/setup-bun@v2
|
- uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
|
|
@ -79,7 +69,7 @@ jobs:
|
||||||
uses: swatinem/rust-cache@v2
|
uses: swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: "./src-tauri -> target"
|
workspaces: "./src-tauri -> target"
|
||||||
key: ${{ inputs.platform }}-${{ inputs.target }}-whisper-rs-0.14.4
|
key: ${{ inputs.platform }}-${{ inputs.target }}
|
||||||
|
|
||||||
- name: install dependencies (ubuntu 24.04)
|
- name: install dependencies (ubuntu 24.04)
|
||||||
if: contains(inputs.platform, 'ubuntu-24.04')
|
if: contains(inputs.platform, 'ubuntu-24.04')
|
||||||
|
|
@ -159,13 +149,6 @@ jobs:
|
||||||
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
|
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
|
||||||
echo "Certificate imported."
|
echo "Certificate imported."
|
||||||
|
|
||||||
- name: Set application version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "Setting version to: ${{ steps.determine-version.outputs.version }}"
|
|
||||||
# Update version in tauri.conf.json
|
|
||||||
sed -i.bak 's/"version": "[^"]*"/"version": "${{ steps.determine-version.outputs.version }}"/' src-tauri/tauri.conf.json
|
|
||||||
|
|
||||||
- name: Build with Tauri
|
- name: Build with Tauri
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
env:
|
env:
|
||||||
|
|
@ -183,8 +166,8 @@ jobs:
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ inputs.sign-binaries && secrets.TAURI_SIGNING_PRIVATE_KEY || '' }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ inputs.sign-binaries && secrets.TAURI_SIGNING_PRIVATE_KEY || '' }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ inputs.sign-binaries && secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD || '' }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ inputs.sign-binaries && secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD || '' }}
|
||||||
with:
|
with:
|
||||||
tagName: ${{ inputs.release-id && format('v{0}', steps.determine-version.outputs.version) || '' }}
|
tagName: ${{ inputs.release-id && format('v{0}', steps.get-version.outputs.version) || '' }}
|
||||||
releaseName: ${{ inputs.release-id && format('v{0}', steps.determine-version.outputs.version) || '' }}
|
releaseName: ${{ inputs.release-id && format('v{0}', steps.get-version.outputs.version) || '' }}
|
||||||
releaseId: ${{ inputs.release-id }}
|
releaseId: ${{ inputs.release-id }}
|
||||||
args: ${{ inputs.build-args }}
|
args: ${{ inputs.build-args }}
|
||||||
|
|
||||||
|
|
|
||||||
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
|
|
@ -9,30 +9,18 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
release-id: ${{ steps.create-release.outputs.result }}
|
release-id: ${{ steps.create-release.outputs.result }}
|
||||||
version: ${{ steps.determine-version.outputs.version }}
|
version: ${{ steps.get-version.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Determine Version
|
- name: Get version from tauri.conf.json
|
||||||
id: determine-version
|
id: get-version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
APP_VERSION=""
|
VERSION=$(grep -o '"version": "[^"]*"' src-tauri/tauri.conf.json | cut -d'"' -f4)
|
||||||
REF="${{ github.ref }}"
|
echo "Application version from tauri.conf.json: $VERSION"
|
||||||
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
if [[ "$REF" == refs/tags/v* ]]; then
|
|
||||||
APP_VERSION="${REF#refs/tags/v}"
|
|
||||||
echo "Release version determined from tag: $APP_VERSION"
|
|
||||||
else
|
|
||||||
DESCRIBE=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
|
|
||||||
APP_VERSION="${DESCRIBE#v}"
|
|
||||||
echo "CI version determined from latest tag or fallback: $APP_VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "version=${APP_VERSION}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Create Draft Release
|
- name: Create Draft Release
|
||||||
id: create-release
|
id: create-release
|
||||||
|
|
@ -42,8 +30,8 @@ jobs:
|
||||||
const { data } = await github.rest.repos.createRelease({
|
const { data } = await github.rest.repos.createRelease({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
tag_name: `v${{ steps.determine-version.outputs.version }}`,
|
tag_name: `v${{ steps.get-version.outputs.version }}`,
|
||||||
name: `v${{ steps.determine-version.outputs.version }}`,
|
name: `v${{ steps.get-version.outputs.version }}`,
|
||||||
draft: true,
|
draft: true,
|
||||||
prerelease: false,
|
prerelease: false,
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
@ -80,4 +68,6 @@ jobs:
|
||||||
asset-prefix: "handy"
|
asset-prefix: "handy"
|
||||||
upload-artifacts: false
|
upload-artifacts: false
|
||||||
release-id: ${{ needs.create-release.outputs.release-id }}
|
release-id: ${{ needs.create-release.outputs.release-id }}
|
||||||
|
tag-name: "v${{ needs.create-release.outputs.version }}"
|
||||||
|
release-name: "v${{ needs.create-release.outputs.version }}"
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue