Skip to content

Commit

Permalink
chore(action): delete previous nightly release
Browse files Browse the repository at this point in the history
  • Loading branch information
thep0y committed Aug 4, 2024
1 parent 445aeec commit 5822101
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,26 @@ jobs:
return latesVersion
- name: check nightly
- name: get old nightly release id
run: |
release_id=$(curl -s 'https://api.github.com/repos/alley-rs/fluxy/releases/tags/nightly' | awk -F'[{},:]+' '/^ "id"/ {print $2}' | xargs)
echo "RELEASE_ID=$release_id" >> $GITHUB_ENV
- name: delete old nightly release
uses: actions/github-script@v7
with:
script: |
await github.rest.repos.deleteRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.RELEASE_ID,
})
- name: create release
id: create-release
uses: actions/github-script@v7
with:
script: |
if (process.env.RELEASE_ID) return parseInt(process.env.RELEASE_ID)
const { data } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit 5822101

Please sign in to comment.