Skip to content

Commit

Permalink
create release draft
Browse files Browse the repository at this point in the history
  • Loading branch information
cnadler86 committed Nov 6, 2024
1 parent b78ecdd commit 899ff37
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/Create-Release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Create-Release
name: Add-Artifacts-to-Draft-Release

on:
push:
tags:
- '*'
release:
types:
- created

create_release:
jobs:
add_artifacts:
if: ${{ github.event.release.draft }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -14,23 +16,17 @@ on:
- name: Set up GitHub CLI
uses: actions/setup-gh-cli@v2

- name: Authenticate GitHub CLI
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: firmware-*
path: ./artifacts

- name: Create Draft Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: "Release ${{ github.ref_name }}"
draft: true
prerelease: false
body: "Draft release for ${{ github.ref_name }}"

- name: Upload Release Assets
run: |
for file in ./artifacts/*; do
gh release upload ${{ github.ref_name }} "$file" --clobber
done
gh release upload "${{ github.event.release.tag_name }}" "$file" --clobber
done

0 comments on commit 899ff37

Please sign in to comment.