From 7cc0b1fb9fdf4bb28030b3837d7227ae74faf1df Mon Sep 17 00:00:00 2001 From: Hoang Dinh Date: Mon, 25 Mar 2024 16:19:54 +1000 Subject: [PATCH] build: fix --- .github/actions/build-ubuntu/action.yaml | 13 ++++++++++--- .github/workflows/release.yaml | 6 ++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/actions/build-ubuntu/action.yaml b/.github/actions/build-ubuntu/action.yaml index a5191aba8..c4de8e65c 100644 --- a/.github/actions/build-ubuntu/action.yaml +++ b/.github/actions/build-ubuntu/action.yaml @@ -1,17 +1,24 @@ name: 'Build for Ubuntu' +inputs: + release-version: + description: 'The release version' + runs: using: 'composite' steps: - - name: install dependencies (ubuntu only) + - name: install dependencies run: | sudo apt-get update sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf shell: bash + - name: bump version in tauri.conf.json + if: ${{ inputs.release-version != '' }} + run: | + sed -i "s/\"version\": \"0.0.0\"/\"version\": \"${{ needs.create-release.outputs.release-version }}\"/g" "src-tauri/tauri.conf.json" + - name: build tauri app uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload binary as artifact uses: actions/upload-artifact@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fa92447d3..b6946fe3a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -97,10 +97,8 @@ jobs: - name: install npm dependencies run: npm install - - name: bump version in tauri.conf.json - run: | - sed -i "s/\"version\": \"0.0.0\"/\"version\": \"${{ needs.create-release.outputs.release-version }}\"/g" "src-tauri/tauri.conf.json" - - name: build for ubuntu if: ${{ runner.os == 'Linux' }} uses: ./.github/actions/build-ubuntu + with: + release-version: ${{ needs.create-release.outputs.release-version }}