Skip to content

Commit a426e33

Browse files
fix: feature dependcy local path (#728)
* fix: feature dependcy local path * chore: use build args from env * chore: remove no use step --------- Co-authored-by: hardy <[email protected]>
1 parent bb7dd6b commit a426e33

File tree

1 file changed

+6
-33
lines changed

1 file changed

+6
-33
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,15 @@ jobs:
8484
- name: Add pizza engine as a dependency
8585
working-directory: src-tauri
8686
run: |
87+
BUILD_ARGS="--target ${{ matrix.target }}"
8788
if [[ "${{matrix.target }}" != "i686-pc-windows-msvc" ]]; then
8889
echo "Adding pizza engine as a dependency for ${{matrix.platform }}-${{matrix.target }}"
89-
( cargo add --path ../../pizza/lib/engine --features query_string_parser,persistence )
90+
( cargo add --path ../pizza/lib/engine --features query_string_parser,persistence )
91+
BUILD_ARGS+=" --features use_pizza_engine"
9092
else
9193
echo "Skipping pizza engine dependency for ${{matrix.platform }}-${{matrix.target }}"
9294
fi
95+
echo "BUILD_ARGS=${BUILD_ARGS}" >> $GITHUB_ENV
9396
9497
- name: Rust cache
9598
uses: swatinem/rust-cache@v2
@@ -104,39 +107,9 @@ jobs:
104107

105108
- name: Install app dependencies and build web
106109
run: pnpm install --frozen-lockfile
107-
108-
- name: Pizza engine features setup
109-
working-directory: src-tauri
110-
run: |
111-
112-
113-
110+
114111
- name: Build the app with ${{ matrix.platform }}
115112
uses: tauri-apps/tauri-action@v0
116-
if: matrix.target != 'i686-pc-windows-msvc'
117-
env:
118-
CI: false
119-
PLATFORM: ${{ matrix.platform }}
120-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
121-
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
122-
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ""
123-
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
124-
APPLE_CERTIFICATE_PASSWORD: ""
125-
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
126-
APPLE_ID: ${{ secrets.APPLE_ID }}
127-
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
128-
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
129-
with:
130-
tagName: ${{ github.ref_name }}
131-
releaseName: Coco ${{ needs.create-release.outputs.APP_VERSION }}
132-
releaseBody: ""
133-
releaseDraft: true
134-
prerelease: false
135-
args: --target ${{ matrix.target }} --features use_pizza_engine
136-
137-
- name: Build the app with ${{ matrix.platform }} (windows i686 only)
138-
uses: tauri-apps/tauri-action@v0
139-
if: matrix.target == 'i686-pc-windows-msvc'
140113
env:
141114
CI: false
142115
PLATFORM: ${{ matrix.platform }}
@@ -155,4 +128,4 @@ jobs:
155128
releaseBody: ""
156129
releaseDraft: true
157130
prerelease: false
158-
args: --target ${{ matrix.target }}
131+
args: ${{ env.BUILD_ARGS }}

0 commit comments

Comments
 (0)