Skip to content

Commit fc6aa16

Browse files
yairm210Yair Morgenstern
andauthored
Separate E2E tests into draft + non-draft - each one has its own cleanup (#146)
* Separate E2E tests into draft + non-draft - each one has its own cleanup * Clean up draft separately * Avoid double builds on pr from this repo * That didn't work --------- Co-authored-by: Yair Morgenstern <[email protected]>
1 parent 02f15da commit fc6aa16

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/e2e_test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ jobs:
8181
8282
assert.deepStrictEqual(release.data.assets.map(a => a.name), ["TEST.md", "TEST2.md"])
8383
84+
85+
- name: Clean up draft
86+
if: ${{ always() }}
87+
uses: actions/github-script@v7
88+
with:
89+
github-token: ${{ secrets.GITHUB_TOKEN }}
90+
script: |
91+
await github.rest.repos.deleteRelease({
92+
...context.repo,
93+
release_id: ${{ steps.make-draft.outputs.release_id }},
94+
})
95+
8496
- name: Make test pre-release
8597
uses: ./
8698
with:

action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ inputs:
3838
description: 'Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository\"s default branch (usually `main`).'
3939
repo_name:
4040
description: 'Specify the name of the GitHub repository in which the GitHub release will be created, edited, and deleted. If the repository is other than the current, it is required to create a personal access token with `repo`, `user`, `admin:repo_hook` scopes to the foreign repository and add it as a secret. Defaults to the current repository'
41-
draft_id:
41+
release_id:
4242
description: 'Specify the ID of the draft release you want to upload to.'
4343
check_duplicates:
4444
description: 'Check for duplicate assets with the same name in the release and skip uploading of those. Defaults to "true".'
45-
default: true
4645
outputs:
4746
browser_download_url:
4847
description: 'The publicly available URL of the asset.'
49-
draft_id:
48+
release_id:
5049
description: 'The ID of the draft release created.'
5150
runs:
5251
using: 'node20'

0 commit comments

Comments
 (0)