Skip to content

Commit

Permalink
Merge pull request #240 from adambkaplan/ship-0038-release-add-ref-tag
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 10cec08 + 4aed42a commit 0b80ff0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
previous-tag:
description: 'Previous release tag'
required: true
git-ref:
description: 'Git reference for the release. Use an appropriate release-v* branch, tag, or commit SHA.'
required: true
jobs:
release:
name: Release
Expand All @@ -20,7 +23,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release }}
ref: ${{ inputs.git-ref }}
fetch-depth: 0

- name: Install Go
Expand All @@ -29,11 +32,20 @@ jobs:
go-version: '1.19.x'
cache: true
check-latest: true

- name: Tag release
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "${{ inputs.release }}" -m "Release ${{ inputs.release }}" --force
git push origin "${{ inputs.release }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build Release Changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PREVIOUS_TAG: ${{ github.event.inputs.previous-tag }}
PREVIOUS_TAG: ${{ inputs.previous-tag }}
# This creates a set of release notes at Changes.md
run: |
export GITHUB_TOKEN
Expand Down

0 comments on commit 0b80ff0

Please sign in to comment.