Skip to content

Commit

Permalink
WIP: set draft flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hairyhum committed Jun 26, 2024
1 parent 04d6130 commit 234f14c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Release
on:
push:
branches:
- ci-release-test
- master

workflow_dispatch:
Expand All @@ -11,8 +12,14 @@ on:
description: 'Image tag in the format x.x.x(-rcx)'
required: true
type: string
draft_release:
description: 'Publish as a draft'
required: true
default: true
type: boolean

env:
DRAFT_RELEASE: ${{ github.event_name == 'push' && github.ref_name == 'ci-release-test' && 'true' || github.event_name == 'workflow_dispatch' && inputs.draft_release == true && 'true' || 'false' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
Expand All @@ -23,6 +30,7 @@ jobs:
release_tag: ${{ steps.release_tag.outputs.release_tag }}
steps:
- run: echo "Triggered by ${{ github.event_name }}"
- run: 'echo "Draft release: ${{ env.DRAFT_RELEASE }}"'
- id: release_tag
run: |
if [[ ${{github.event_name}} == "push" ]]
Expand Down Expand Up @@ -86,6 +94,7 @@ jobs:
env:
GHCR_LOGIN_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHCR_LOGIN_USER: ${{ github.actor }}
GORELEASE_PARAMS: ${{ env.DRAFT_RELEASE == 'true' && '--draft' || '' }}
## Upload to use in docs publishing
- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 234f14c

Please sign in to comment.