Skip to content

Commit e3c7765

Browse files
committed
Update build action to reflect tauri changes
1 parent 660cf98 commit e3c7765

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,30 +80,40 @@ jobs:
8080
- name: install npm packages
8181
run: npm ci
8282

83-
- uses: tauri-apps/tauri-action@v0
83+
- uses: tauri-apps/tauri-action@v0.5.23
8484
id: tauri_build
8585
env:
8686
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8787
with:
8888
args: --target ${{ matrix.platform.rust_target }}
8989

90-
# - uses: JonasKruckenberg/tauri-build@v1
91-
# id: tauri_build
92-
# with:
93-
# projectPath: '.'
94-
# runner: npm run
95-
# args: --
96-
# target: ${{ matrix.platform.rust_target }}
90+
- name: Prepare artifact paths
91+
if: matrix.platform.os == 'macos-latest'
92+
id: prepare_outputs
93+
run: |
94+
# join the tauri action output into a newline-separated string
95+
ARTIFACTS_RAW="${{ join(fromJSON(steps.tauri_build.outputs.artifactPaths), '\n') }}"
96+
# append .tar.gz to each non-empty line and produce a JSON array
97+
ARTIFACT_JSON=$(printf '%s' "$ARTIFACTS_RAW" | jq -R -s -c 'split("\n") | map(select(length > 0) | . + ".tar.gz")')
98+
echo Outputs:
99+
echo "$ARTIFACT_JSON"
100+
echo "ARTIFACT_PATHS=${ARTIFACT_JSON}" >> $GITHUB_OUTPUT
97101
98102
- name: Git status and version
99103
run: |
100104
git status
101105
git describe --tags --dirty --always
102106
git diff
103-
echo ${{ steps.tauri_build.outputs.artifactPaths }}
104107
105108
# The artifacts output can now be used to upload the artifacts
106109
- uses: actions/upload-artifact@v4
110+
if: matrix.platform.os == 'macos-latest'
111+
with:
112+
name: ${{ matrix.platform.rust_target }}
113+
path: "${{ join(fromJSON(steps.prepare_outputs.outputs.ARTIFACT_PATHS), '\n') }}"
114+
115+
- uses: actions/upload-artifact@v4
116+
if: matrix.platform.os != 'macos-latest'
107117
with:
108118
name: ${{ matrix.platform.rust_target }}
109119
path: "${{ join(fromJSON(steps.tauri_build.outputs.artifactPaths), '\n') }}"

0 commit comments

Comments
 (0)