Skip to content

Commit

Permalink
Merge pull request #199 from adambkaplan/ship-0038-release-ref
Browse files Browse the repository at this point in the history
SHIP-0038: Add Git Ref to Release Workflow
  • Loading branch information
openshift-merge-bot[bot] authored Mar 22, 2024
2 parents a8e8748 + 26db7df commit 50700d4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
previous-tag:
description: 'Previous tag'
required: false
git-ref:
description: 'Git reference for the release. Use an appropriate release-v* branch, tag, or commit SHA.'
required: true
jobs:
release:
# if: ${{ github.repository == 'shipwright-io/build' }}
Expand All @@ -20,14 +23,15 @@ jobs:
env:
IMAGE_HOST: ghcr.io
IMAGE_NAMESPACE: ${{ github.repository }}
VERSION: ${{ github.event.inputs.release }}
VERSION: ${{ inputs.release }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git-ref }}
fetch-depth: 0 # Fetch all history, needed for release note generation.
# Install tools
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.21.x
cache: true
Expand All @@ -54,16 +58,16 @@ jobs:
- name: Build Release Changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PREVIOUS_TAG: ${{ github.event.inputs.previous-tag }}
PREVIOUS_TAG: ${{ inputs.previous-tag }}
REPOSITORY: ${{ github.repository }}
run: |
"${GITHUB_WORKSPACE}/.github/draft_release_notes.sh"
- name: Draft release
id: draft_release
uses: actions/create-release@v1
with:
release_name: ${{ github.event.inputs.release }}
tag_name: ${{ github.event.inputs.release }}
release_name: ${{ inputs.release }}
tag_name: ${{ inputs.release }}
draft: true
prerelease: true
body_path: Changes.md
Expand Down

0 comments on commit 50700d4

Please sign in to comment.