Skip to content

Commit

Permalink
Retain all build artifacts
Browse files Browse the repository at this point in the history
Free for public repos
  • Loading branch information
Logicer16 committed Dec 20, 2024
1 parent 2af7fce commit b1c75f4
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,3 @@ jobs:
if: ${{ matrix.xcode-select == 'xcode' && matrix.version == 15 }}
with:
subject-path: ${{ env.outPath }}

- name: Purge old artifacts
uses: actions/github-script@v4
if: ${{ matrix.xcode-select == 'xcode' && matrix.version == 15 && github.event_name != 'pull_request' }}
with:
script: |
const { owner, repo } = context.issue
const res = await github.rest.actions.listArtifactsForRepo({
owner,
repo,
})
res.data.artifacts
.filter(({ name }) => name === 'pam-watchid.so.${{ steps.getVersion.outputs.version }}')
.sort((a, b) => a.workflow_run.id - b.workflow_run.id).slice(0, -1)
.forEach(({ id }) => {
github.rest.actions.deleteArtifact({
owner,
repo,
artifact_id: id,
})
})

0 comments on commit b1c75f4

Please sign in to comment.