Skip to content

Commit

Permalink
Update create-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentC35 committed Jan 18, 2024
1 parent 75d2fa9 commit 98a86f9
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,53 +13,53 @@ on:

jobs:

check-version:
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.version-step.outputs.version }}
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
# check-version:
# runs-on: ubuntu-latest
# outputs:
# release-version: ${{ steps.version-step.outputs.version }}
# steps:
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: '17'

- name: Checkout Eno repo
uses: actions/checkout@v4
# - name: Checkout Eno repo
# uses: actions/checkout@v4

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
# - name: Setup Gradle
# uses: gradle/gradle-build-action@v2

- name: Get Eno Version
id: version-step
run: |
./gradlew # (load the gradle wrapper, required for the get version step)
echo "version=$(./gradlew printVersion --console=plain -q)" >> $GITHUB_OUTPUT
# - name: Get Eno Version
# id: version-step
# run: |
# ./gradlew # (load the gradle wrapper, required for the get version step)
# echo "version=$(./gradlew printVersion --console=plain -q)" >> $GITHUB_OUTPUT

- name: Print Eno Version
run: echo ${{ steps.version-step.outputs.version }}
# - name: Print Eno Version
# run: echo ${{ steps.version-step.outputs.version }}

- uses: mukunku/[email protected]
name: Check tag existence
id: check-tag-exists
with:
tag: ${{ steps.version-step.outputs.version }}
# - uses: mukunku/[email protected]
# name: Check tag existence
# id: check-tag-exists
# with:
# tag: ${{ steps.version-step.outputs.version }}

- name: Tag verification
id: check-tag
run: |
if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "true" ]]; then
echo "Nothing to tag/release, the tag ${{ steps.version-step.outputs.version }} already exists"
exit 1
fi
# - name: Tag verification
# id: check-tag
# run: |
# if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "true" ]]; then
# echo "Nothing to tag/release, the tag ${{ steps.version-step.outputs.version }} already exists"
# exit 1
# fi

if ! [[ "${{ steps.version-step.outputs.version }}" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then
echo "Nothing to tag/release, the tag ${{ steps.version-step.outputs.version }} is not in correct format X.Y.Z"
exit 1
fi
# if ! [[ "${{ steps.version-step.outputs.version }}" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then
# echo "Nothing to tag/release, the tag ${{ steps.version-step.outputs.version }} is not in correct format X.Y.Z"
# exit 1
# fi

build-sources:
needs: check-version
# needs: check-version
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
Expand Down

0 comments on commit 98a86f9

Please sign in to comment.