Skip to content

Commit

Permalink
Merge pull request #601 from 1AhmedYasser/software-versioning
Browse files Browse the repository at this point in the history
Software versioning
  • Loading branch information
varmoh authored May 24, 2024
2 parents fc3f764 + b0bc70b commit 5258fae
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Create Release

on:
push:
branches: ["test", "stage", "main"]
workflow_dispatch:
env:
BRANCH: ${{ github.head_ref || github.ref_name }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Load environment variables
run: awk -v branch=${{ env.BRANCH }} '/^BRANCH=/{p = ($0 == "BRANCH=" branch)} p && NF' release.env >> $GITHUB_ENV
- name: Create-Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}${{ env.TYPE != '' && format('-{0}',env.TYPE) || '' }}${{ env.TYPE_VERSION != '' && format('.{0}',env.TYPE_VERSION) || '' }}
generate_release_notes: true
body_path: ${{ github.workspace }}/RELEASE_NOTES
33 changes: 33 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## v1.0.0-alpha.1 (2024-05-15)

> Description
### Upgrade Steps

- [ACTION REQUIRED]
-

### Breaking Changes

-
-

### New Features

-
-

### Bug Fixes

-
-

### Performance Improvements

-
-

### Other Changes

-
-
18 changes: 18 additions & 0 deletions release.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
BRANCH=test
MAJOR=1
MINOR=0
PATCH=0
TYPE=alpha
TYPE_VERSION=1

BRANCH=stage
MAJOR=1
MINOR=0
PATCH=0
TYPE=rc
TYPE_VERSION=1

BRANCH=main
MAJOR=1
MINOR=0
PATCH=0

0 comments on commit 5258fae

Please sign in to comment.