Skip to content

Commit

Permalink
Actions - Automatic version number
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoalves committed Sep 30, 2022
1 parent 36c928a commit 4b5e277
Showing 1 changed file with 24 additions and 28 deletions.
52 changes: 24 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
releaseNumber:
description: 'Release number'
required: true
# releaseNumber:
# description: 'Release number'
# required: true
denoVersion:
description: 'Deno version (optional)'
required: false
Expand All @@ -17,27 +17,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check releaseNumber
run: |
version=$LEVAIN_VERSION
if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo Version v${version};
else
echo Invalid version number - $version;
echo
echo You must use the pattern
echo major.minor.patch
echo
echo Examples:
echo 0.20.1
echo 1.0.3
echo 2.5.0
echo
exit 1
fi
env:
LEVAIN_VERSION: ${{ github.event.inputs.releaseNumber }}
# - name: Check releaseNumber
# run: |
# version=$LEVAIN_VERSION
# if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# echo Version v${version};
# else
# echo Invalid version number - $version;
# echo
# echo You must use the pattern
# echo major.minor.patch
# echo
# echo Examples:
# echo 0.20.1
# echo 1.0.3
# echo 2.5.0
# echo

# exit 1
# fi
# env:
# LEVAIN_VERSION: ${{ github.event.inputs.releaseNumber }}

- name: Check denoVersion
run: |
Expand Down Expand Up @@ -192,10 +192,6 @@ jobs:
LEVAIN_RELEASE_PATH: ${{ runner.temp }}/levain-${{ env.RELEASE_VERSION }}


- name: Abort
run: exit 1


##############################################################
### Create release
##############################################################
Expand Down

0 comments on commit 4b5e277

Please sign in to comment.