Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ahobsonsayers committed Apr 29, 2024
1 parent d02640d commit cff4b01
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

on:
workflow_dispatch:
inputs:
commit:
description: Full Commit Hash
type: string
required: true
default-bump:
description: Default Version Bump (if none found in commit messages)
type: choice
options:
- major
- minor
- patch
default: patch
required: false

jobs:
create-release:
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
shell: bash

steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}

- name: Create Tag
id: tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: ${{ github.event.inputs.default-bump }}
create_annotated_tag: true

- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.tag.outputs.new_tag }}
tag_name: ${{ steps.tag.outputs.new_tag }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
tag: ${{ steps.tag.outputs.new_tag }}

build-push:
name: Build and Push
needs: [create-release]
uses: ./.github/workflows/build_push.yaml
with:
commit: ${{ github.sha }}
tags: latest,${{ needs.create-release.outputs.tag }}
secrets: inherit

0 comments on commit cff4b01

Please sign in to comment.