Skip to content

Commit

Permalink
split
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-artemkin committed Dec 27, 2023
1 parent 5f51f8d commit 7fa770b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
paths:
- '.github/workflows/**'

workflow_dispatch:

jobs:
create-tag:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: create tag
run: |
latestVersion="$(git describe --tags $(git rev-list --tags --max-count=1))"
if [ -z "$latestVersion" ]; then
latestVersion="1.0.0"
fi
latestVersionPrefix="$(awk -F'.' '{ $NF=""; print }' <<< "$latestVersion" | tr " " ".")"
latestMinorVersion="$(sed "s/$latestVersionPrefix//g" <<< "$latestVersion")"
newMinorVersion=$(( $latestMinorVersion + 1 ))
newVersion="$latestVersionPrefix$newMinorVersion"
git tag "$newVersion"
git push origin "$newVersion" || exit 1
12 changes: 0 additions & 12 deletions .github/workflows/update-db.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI

on:
push:
paths:
- '.github/workflows/**'
schedule:
- cron: '0 0 1 * *'

Expand Down Expand Up @@ -49,12 +46,3 @@ jobs:
git push || exit 1
fi
- name: create tag
run: |
latestVersion="$(git describe --tags $(git rev-list --tags --max-count=1))"
latestVersionPrefix="$(awk -F'.' '{ $NF=""; print }' <<< "$latestVersion" | tr " " ".")"
latestMinorVersion="$(sed "s/$latestVersionPrefix//g" <<< "$latestVersion")"
newMinorVersion=$(( $latestMinorVersion + 1 ))
newVersion="$latestVersionPrefix$newMinorVersion"
git tag "$newVersion"
git push origin "$newVersion" || exit 1

0 comments on commit 7fa770b

Please sign in to comment.