Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorinvoicu committed Jun 3, 2024
1 parent 0b98266 commit eeda4c5
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Release 📈

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
push:
branches:
- main
workflow_call:

concurrency:
group: release-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
create-release:
name: ${{ vars.CI_IMAGE }}
runs-on: ubuntu-latest

steps:
- name: Checkout project ⬇️
uses: actions/checkout@v4

- name: NEWS.md and DESCRIPTION Version check 🏁
run: |
DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION | tr -d '\n' | xargs)
NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n' | xargs)
DESC_DEV_VERSION=$(echo $DESC_VERSION | awk -F '.' '{print $NF}')
echo "NEWS.md version: $NEWS_VERSION"
echo "DESCRIPTION version: $DESC_VERSION"
if [ $DESC_DEV_VERSION -ge 9000 ]; then
echo "✖️ DESCRIPTION file version is in development mode."
echo "Please fix this."
exit 1
fi
if [ "$DESC_VERSION" = "$NEWS_VERSION" ]; then
echo "✔️ NEWS.md and DESCRIPTION have the same version"
exit 0
else
echo "✖️ NEWS.md and DESCRIPTION have different versions"
echo "Please fix this."
exit 1
fi
shell: bash
6 changes: 5 additions & 1 deletion .github/workflows/shared_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ jobs:

styler:
name: Styler 🌐
uses: boehringer-ingelheim/dv.templates/.github/workflows/styler.yml@main
uses: boehringer-ingelheim/dv.templates/.github/workflows/styler.yml@main

release:
name: Release 📈
uses: boehringer-ingelheim/dv.templates/.github/workflows/release.yml@main
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# dv.templates 0.0.0.9100

- add release checks

0 comments on commit eeda4c5

Please sign in to comment.