Skip to content

Commit

Permalink
Delete failed releases
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Sep 26, 2024
1 parent 1c7a78f commit e6a266e
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Build Ark Release"
on:
push:
branches:
- main
- feature/release-cleanup
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -58,23 +58,32 @@ jobs:
# Build ARK for macOS. Both arm64 (Apple Silicon) and x64 (Intel) hosts.
build_macos:
name: Build macOS
uses: ./.github/workflows/release-macos.yml
# uses: ./.github/workflows/release-macos.yml
steps:
- name: Dummy step
run: echo ""
needs: [do_release, get_version]
secrets: inherit
with:
version: ${{ needs.get_version.outputs.ARK_VERSION }}

build_windows:
name: Build Windows
uses: ./.github/workflows/release-windows.yml
# uses: ./.github/workflows/release-windows.yml
steps:
- name: Dummy step
run: echo ""
needs: [do_release, get_version]
secrets: inherit
with:
version: ${{ needs.get_version.outputs.ARK_VERSION }}

build_linux:
name: "Build Linux"
uses: ./.github/workflows/release-linux.yml
# uses: ./.github/workflows/release-linux.yml
steps:
- name: Dummy step
run: echo ""
needs: [do_release, get_version]
secrets: inherit
with:
Expand Down Expand Up @@ -179,15 +188,23 @@ jobs:
runs-on: ubuntu-latest
needs: [build_macos, build_windows, get_version]
steps:
- name: Notify slack if build fails
uses: slackapi/[email protected]
id: slack-failure
# - name: Notify slack if build fails
# uses: slackapi/[email protected]
# id: slack-failure
# with:
# payload: |
# {
# "message": "Positron build ${{ needs.get_version.outputs.ARK_VERSION }} failed",
# "status": "Failure",
# "run_url": "https://github.com/posit-dev/positron/actions/runs/${{ github.run_id }}"
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Delete release
with:
payload: |
{
"message": "Positron build ${{ needs.get_version.outputs.ARK_VERSION }} failed",
"status": "Failure",
"run_url": "https://github.com/posit-dev/positron/actions/runs/${{ github.run_id }}"
}
release_name: ${{ needs.get_version.outputs.ARK_VERSION }}
tag_name: ${{ needs.get_version.outputs.ARK_VERSION }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
GH_TOKEN: ${{ github.token }}
run: |
gh release delete ${{ tag_name }} -y --cleanup-tag

0 comments on commit e6a266e

Please sign in to comment.