Skip to content

Commit b7e7508

Browse files
committed
release: build and release plugins
1 parent 1c10fdb commit b7e7508

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,24 +147,38 @@ jobs:
147147
key: ${{ matrix.target }}
148148
- name: Build
149149
run: cargo build --release --target ${{ matrix.target }}
150+
- name: Build plugins
151+
run: cargo build --release --target ${{ matrix.target }} -p repos-health
150152
- name: Strip (Linux)
151153
if: startsWith(matrix.target, 'x86_64-unknown-linux')
152-
run: strip target/${{ matrix.target }}/release/repos
154+
run: |
155+
strip target/${{ matrix.target }}/release/repos
156+
strip target/${{ matrix.target }}/release/repos-health
153157
- name: Strip (macOS)
154158
if: contains(matrix.target, 'apple-darwin')
155-
run: strip -x target/${{ matrix.target }}/release/repos || true
159+
run: |
160+
strip -x target/${{ matrix.target }}/release/repos || true
161+
strip -x target/${{ matrix.target }}/release/repos-health || true
156162
- name: Package
157163
run: |
158164
staging="repos-${{ needs.semantic-version.outputs.version }}-${{ matrix.target }}"
159165
mkdir "$staging"
160166
cp target/${{ matrix.target }}/release/repos "$staging/"
161167
tar czf "$staging.tar.gz" "$staging"
162168
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
169+
170+
plugin_staging="repos-health-${{ needs.semantic-version.outputs.version }}-${{ matrix.target }}"
171+
mkdir "$plugin_staging"
172+
cp target/${{ matrix.target }}/release/repos-health "$plugin_staging/"
173+
tar czf "$plugin_staging.tar.gz" "$plugin_staging"
174+
echo "PLUGIN_ASSET=$plugin_staging.tar.gz" >> $GITHUB_ENV
163175
- name: Upload Asset
164176
uses: softprops/action-gh-release@v2
165177
with:
166178
tag_name: ${{ needs.semantic-version.outputs.version_tag }}
167-
files: ${{ env.ASSET }}
179+
files: |
180+
${{ env.ASSET }}
181+
${{ env.PLUGIN_ASSET }}
168182
169183
build-universal-macos:
170184
name: Universal macOS
@@ -180,6 +194,8 @@ jobs:
180194
- uses: Swatinem/rust-cache@v2
181195
- run: cargo build --release --target x86_64-apple-darwin
182196
- run: cargo build --release --target aarch64-apple-darwin
197+
- run: cargo build --release --target x86_64-apple-darwin -p repos-health
198+
- run: cargo build --release --target aarch64-apple-darwin -p repos-health
183199
- run: |
184200
lipo -create \
185201
target/x86_64-apple-darwin/release/repos \
@@ -191,10 +207,23 @@ jobs:
191207
mv repos "$staging/"
192208
tar czf "$staging.tar.gz" "$staging"
193209
echo "UNIVERSAL=$staging.tar.gz" >> $GITHUB_ENV
210+
211+
lipo -create \
212+
target/x86_64-apple-darwin/release/repos-health \
213+
target/aarch64-apple-darwin/release/repos-health \
214+
-output repos-health
215+
strip -x repos-health || true
216+
plugin_staging="repos-health-${{ needs.semantic-version.outputs.version }}-universal-apple-darwin"
217+
mkdir "$plugin_staging"
218+
mv repos-health "$plugin_staging/"
219+
tar czf "$plugin_staging.tar.gz" "$plugin_staging"
220+
echo "UNIVERSAL_PLUGIN=$plugin_staging.tar.gz" >> $GITHUB_ENV
194221
- uses: softprops/action-gh-release@v2
195222
with:
196223
tag_name: ${{ needs.semantic-version.outputs.version_tag }}
197-
files: ${{ env.UNIVERSAL }}
224+
files: |
225+
${{ env.UNIVERSAL }}
226+
${{ env.UNIVERSAL_PLUGIN }}
198227
199228
sync-main:
200229
name: Sync version back to main

0 commit comments

Comments
 (0)