Skip to content

Commit

Permalink
DEV: retrive assets from data object
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothkannans committed Nov 4, 2024
1 parent 89710c9 commit 023a2ee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
- uses: shivammathur/setup-php@2.31.1
with:
php-version: '8.3'
- uses: actions/checkout@v4
Expand Down Expand Up @@ -46,17 +46,21 @@ jobs:
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Delete the previous pre-release
uses: actions/[email protected]
continue-on-error: true
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
console.log('searching for release...')
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: 'tests-passed',
})
if (release) {
release.assets.forEach(async (asset) => {
console.log('found release ' + release.data.id)
release.data.assets.forEach(async (asset) => {
await github.rest.repos.deleteReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -69,6 +73,8 @@ jobs:
repo: context.repo.repo,
release_id: release.data.id
})
} else {
console.log('no release found')
}
- name: Pre-release
uses: softprops/[email protected]
Expand Down

0 comments on commit 023a2ee

Please sign in to comment.