Skip to content

Commit

Permalink
chore: Allo release action manual dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
bric3 committed Mar 22, 2024
1 parent 4837442 commit ec22f9e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,29 @@ on:
release:
types: [ published ]

workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check semver version in tag
run: |
prefix="v"
tag_name="${{ github.event.release.tag_name }}"
tag_name="${{ github.event.inputs.tag || github.event.release.tag_name }}"
semver_regex="(0|[1-9]\d*)+\.(0|[1-9]\d*)+\.(0|[1-9]\d*)+(-(([a-z-][\da-z-]+|[\da-z-]+[a-z-][\da-z-]*|0|[1-9]\d*)(\.([a-z-][\da-z-]+|[\da-z-]+[a-z-][\da-z-]*|0|[1-9]\d*))*))?(\\+([\da-z-]+(\.[\da-z-]+)*))?"
echo "Checking version: $semver_regex"
echo "$tag_name" | grep -Eq "^$prefix$semver_regex\$"
shell: bash
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
ref: ${{ github.event.inputs.tag || github.event.release.tag_name }}
fetch-depth: 50
- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '19'
Expand Down

0 comments on commit ec22f9e

Please sign in to comment.