Skip to content

Commit

Permalink
create workflow for creating releases
Browse files Browse the repository at this point in the history
  • Loading branch information
raspreet-vunet committed Aug 16, 2023
1 parent 449d6f8 commit 967b5a2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release Workflow

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v1.0.0)'
required: true

jobs:
build_and_release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Extract version from tag
run: echo "VERSION=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" >> $GITHUB_ENV

- name: Build Keycloak
uses: ./.github/actions/build-keycloak
with:
upload-m2-repo: false

- name: Rename artifact
run: mv quarkus/dist/target/keycloak*.tar.gz quarkus/dist/target/keycloak-$VERSION.tar.gz

- name: Create GitHub Release and Upload Artifact
run: |
gh release create $VERSION quarkus/dist/target/keycloak-$VERSION.tar.gz --title "Release $VERSION"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 967b5a2

Please sign in to comment.