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 8ab8fe2
Showing 1 changed file with 40 additions and 23 deletions.
63 changes: 40 additions & 23 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,27 +58,36 @@ 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 }}
# 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 }}
# 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:
version: ${{ needs.get_version.outputs.ARK_VERSION }}
# secrets: inherit
# with:
# version: ${{ needs.get_version.outputs.ARK_VERSION }}

create_release:
name: Create Release
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 8ab8fe2

Please sign in to comment.