Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,39 @@ env:
TAURI_CLI_VERSION: "1.0.3"

jobs:
tauri-release-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: false
path: ${{ env.SOURCE_PATH }}
- name: Install jq
if: startsWith(github.ref, 'refs/tags/v')
run: |
sudo apt-get -y update
sudo apt-get -y install jq
- name: Populate tauri release configuration
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: >
jq
--null-input
--arg version "${GITHUB_REF##*/v}"
-f release.conf.jq
> "${{ github.workspace }}/tauri.release.conf.json"
working-directory: ${{ env.SOURCE_PATH }}/src-tauri
- name: Create empty tauri release configuration
if: startsWith(github.ref, 'refs/tags/v') != true
shell: bash
run: echo "{}" > "${{ github.workspace }}/tauri.release.conf.json"
- uses: actions/upload-artifact@v3
with:
name: tauri.release.conf.json
path: "${{ github.workspace }}/tauri.release.conf.json"

tauri-build:
needs: [ tauri-release-config ]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -60,9 +92,16 @@ jobs:
run: trunk build --release --dist "./../src-tauri/websrc"
if: runner.os == 'Windows'
working-directory: "${{ env.SOURCE_PATH }}/cube_shuffle-wasm"
- name: Download release configuration
uses: actions/download-artifact@v3
with:
name: tauri.release.conf.json
path: "${{ env.SOURCE_PATH }}/src-tauri"
- name: Tauri Build
run: cargo tauri build ${{ runner.os == 'macOS' && '--target universal-apple-darwin' || '' }} || true
run: cargo tauri build ${{ runner.os == 'macOS' && '--target universal-apple-darwin' || '' }} --config "./tauri.release.conf.json"
working-directory: "${{ env.SOURCE_PATH }}/src-tauri"
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}

- uses: actions/upload-artifact@v3
name: Tauri Linux executable
Expand Down Expand Up @@ -366,7 +405,7 @@ jobs:
sudo apt-get -y install jq
- name: Make update json
run: |
jq -n \
jq --null-input \
--arg version "${GITHUB_REF##*/v}" \
--arg tag_version "${GITHUB_REF##*/}" \
--arg now `date --iso-8601=ns` \
Expand Down
Loading