Skip to content

Commit

Permalink
ci(nightly): update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
eythaann committed Oct 13, 2024
1 parent aac2006 commit a43edf6
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ jobs:
- name: Confirm the tag was updated
run: git ls-remote --tags origin

- name: Ensure release is updated to the latest commit
run: |
gh release edit nightly --tag nightly --target $(git rev-parse HEAD) --draft=false
- name: Verify release status
run: gh release view nightly

build-installers:
needs: continuous-integration
permissions:
Expand Down Expand Up @@ -93,23 +86,31 @@ jobs:
prerelease: true
args: ${{ matrix.args }}

publish-release:
remove-old-artifacts:
needs: build-installers
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Publish release
- name: Remove Signatures and Old Artifacts
uses: actions/github-script@v7
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
const tagName = 'nightly';
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: tagName,
});
const result = await github.rest.repos.listReleaseAssets({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.releaseId,
release_id: release.data.id,
});
result.data.forEach(async (asset) => {
result.data.forEach(async (asset) => {
if (asset.name.endsWith('.sig')) {
await github.rest.repos.deleteReleaseAsset({
owner: context.repo.owner,
Expand All @@ -118,9 +119,3 @@ jobs:
});
}
});
await github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.releaseId,
draft: false,
});

0 comments on commit a43edf6

Please sign in to comment.