@@ -127,27 +127,32 @@ jobs:
127127 .out/darwin/fscript-${{ github.ref_name }}-darwin-x64.zip
128128
129129 - name : Remove unsigned macOS artifact
130+ continue-on-error : true
130131 uses : actions/github-script@v7
131132 with :
132133 script : |
133- const tag = context.ref.replace('refs/tags/', '');
134- const unsignedName = `fscript-${tag}-darwin-unsigned.zip`;
135- const { data: release } = await github.rest.repos.getReleaseByTag({
136- owner: context.repo.owner,
137- repo: context.repo.repo,
138- tag,
139- });
140- const asset = release.assets.find(a => a.name === unsignedName);
141- if (!asset) {
142- core.info(`Unsigned artifact not found: ${unsignedName}`);
143- return;
134+ try {
135+ const tag = context.ref.replace('refs/tags/', '');
136+ const unsignedName = `fscript-${tag}-darwin-unsigned.zip`;
137+ const { data: release } = await github.rest.repos.getReleaseByTag({
138+ owner: context.repo.owner,
139+ repo: context.repo.repo,
140+ tag,
141+ });
142+ const asset = release.assets.find(a => a.name === unsignedName);
143+ if (!asset) {
144+ core.info(`Unsigned artifact not found: ${unsignedName}`);
145+ return;
146+ }
147+ await github.rest.repos.deleteReleaseAsset({
148+ owner: context.repo.owner,
149+ repo: context.repo.repo,
150+ asset_id: asset.id,
151+ });
152+ core.info(`Deleted unsigned artifact: ${unsignedName}`);
153+ } catch (error) {
154+ core.warning(`Best-effort cleanup failed: ${error?.message ?? error}`);
144155 }
145- await github.rest.repos.deleteReleaseAsset({
146- owner: context.repo.owner,
147- repo: context.repo.repo,
148- asset_id: asset.id,
149- });
150- core.info(`Deleted unsigned artifact: ${unsignedName}`);
151156
152157 update-homebrew-tap :
153158 uses : ./.github/workflows/release-homebrew-tap.yml
0 commit comments