Skip to content

Commit

Permalink
CI: Add missing step id to release draft, pre-release, artifacts (OSG…
Browse files Browse the repository at this point in the history
…eo#2347)

- Remove new from the name (yes, we are creating a new thing, but it is a draft which says enough).
- To use step_id for asset upload, specify id for the create release step.
- If the tag contains RC, mark the release a pre-release.
- On failure, upload the created file to an artifact for workflow debugging and use of the files for the release.
  • Loading branch information
wenzeslaus authored and neteler committed Nov 7, 2023
1 parent 9b43f0d commit c47f96e
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create new release draft
name: Create a release draft

on:
push:
Expand All @@ -25,6 +25,7 @@ jobs:
git diff --cached > core_modules_with_last_commit.patch
- name: Create new release draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -36,7 +37,7 @@ jobs:
- First change
- Second change
draft: true
prerelease: false
prerelease: ${{ contains(github.ref, "RC") }}

- name: Upload core_modules_with_last_commit.json file
uses: actions/upload-release-asset@v1
Expand All @@ -57,3 +58,13 @@ jobs:
asset_path: core_modules_with_last_commit.patch
asset_name: core_modules_with_last_commit.patch
asset_content_type: text/plain

- name: On failure, make the created files available
uses: actions/upload-artifact@v3
if: failure()
with:
name: artifacts
path: |
core_modules_with_last_commit.*
if-no-files-found: warn
retention-days: 10

0 comments on commit c47f96e

Please sign in to comment.