Skip to content

Commit

Permalink
Create Draft release on commit msg with Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Baarsgaard committed Sep 11, 2024
1 parent 9568591 commit 37b613e
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Create Release

on:
push:
workflow_dispatch:
inputs:
draft:
required: false
default: true
description: Produce a draft release
type: boolean

jobs:
get-tags:
name: Create tagged release
if: contains(github.event.head_commit.message, 'Bump version') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
outputs:
crate-version: ${{ steps.crate-version.outputs.CRATE_VERSION }}
Expand All @@ -34,7 +30,6 @@ jobs:
- run: "echo '::notice:: Tag = v${{ steps.crate-version.outputs.CRATE_VERSION }}'"

- name: Create draft release
if: ${{ github.event.inputs.draft }}
run: >
envsubst '$CRATE_VERSION $OLD_VERSION' < .github/release-notes.md |
gh release create "v$CRATE_VERSION" --title "v$CRATE_VERSION" --notes-file - --draft
Expand All @@ -43,16 +38,6 @@ jobs:
CRATE_VERSION: ${{ steps.crate-version.outputs.CRATE_VERSION }}
OLD_VERSION: ${{ steps.old-version.outputs.OLD_VERSION }}

- name: Create release
if: ${{ !github.event.inputs.draft }}
run: >
envsubst '$CRATE_VERSION $OLD_VERSION' < .github/release-notes.md |
gh release create "v$CRATE_VERSION" --notes-file -
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CRATE_VERSION: ${{ steps.crate-version.outputs.CRATE_VERSION }}
OLD_VERSION: ${{ steps.old-version.outputs.OLD_VERSION }}

build:
name: Build & Upload
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 37b613e

Please sign in to comment.