Skip to content

Commit 90df918

Browse files
committed
Update release to account for cache
1 parent fddedde commit 90df918

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/release.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,26 @@ jobs:
2121
github-token: ${{secrets.GITHUB_TOKEN}}
2222
run-id: ${{github.event.workflow_run.id}}
2323

24+
- name: Check for artifacts
25+
id: check_artifacts
26+
run: |
27+
if [ -z "$(find . -name 'webview_deno_rust*')" ]; then
28+
echo "No artifacts found. Exiting successfully."
29+
echo "artifacts_found=false" >> $GITHUB_OUTPUT
30+
else
31+
echo "Artifacts found. Proceeding with release."
32+
echo "artifacts_found=true" >> $GITHUB_OUTPUT
33+
fi
34+
2435
- name: Get version from Cargo.toml
36+
if: steps.check_artifacts.outputs.artifacts_found == 'true'
2537
id: get_version
2638
run: |
2739
VERSION=$(grep '^version =' Cargo.toml | sed 's/.*= *"//' | sed 's/".*//')
28-
echo "::set-output name=version::$VERSION"
40+
echo "version=$VERSION" >> $GITHUB_OUTPUT
2941
3042
- name: Create Release
43+
if: steps.check_artifacts.outputs.artifacts_found == 'true'
3144
uses: ncipollo/release-action@v1
3245
with:
3346
tag: v${{ steps.get_version.outputs.version }}
@@ -40,4 +53,9 @@ jobs:
4053
artifactErrorsFailBuild: true
4154

4255
- name: Release Status
56+
if: steps.check_artifacts.outputs.artifacts_found == 'true'
4357
run: echo "Release v${{ steps.get_version.outputs.version }} created or updated."
58+
59+
- name: No Release Status
60+
if: steps.check_artifacts.outputs.artifacts_found == 'false'
61+
run: echo "No new release created as no new artifacts were found."

0 commit comments

Comments
 (0)