Skip to content

Commit

Permalink
Merge pull request #47 from floryn08/dev-46-semantic-release-rework
Browse files Browse the repository at this point in the history
Dev 46 semantic release rework
  • Loading branch information
floryn08 authored Aug 26, 2024
2 parents e037abb + 9abeea7 commit 95f25fa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 28 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
39 changes: 11 additions & 28 deletions .github/workflows/tag.yaml → .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Create Tag
name: Create Release

on:
workflow_dispatch:
pull_request:
types:
- closed
push:
branches:
- master
- main
- dev-*

jobs:
tag:
Expand All @@ -18,30 +17,19 @@ jobs:
uses: actions/checkout@v4.1.7
with:
fetch-depth: "0"
token: ${{secrets.ACCESS_TOKEN}}

- name: Setup Git
run: |
git config user.email ${{secrets.EMAIL}}
git config user.name ${{secrets.NAME}}

- name: Set up Node.js
uses: actions/setup-node@v4.0.3
with:
cache: "npm"
node-version: "20"

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.0.0
- name: Semver release
uses: oknozor/cocogitto-action@v3.8
with:
versionSpec: "5.x"

- name: Determine Version
uses: gittools/actions/gitversion/execute@v3.0.0

- name: Display SemVer
run: |
echo "SemVer: $semVer" && echo "$major.$minor.$patch"
release: true
git-user: "$GITHUB_ACTOR"
git-user-email: "$GITHUB_ACTOR@users.noreply.github.com"

- name: Bump package.json
run: |
Expand All @@ -54,10 +42,5 @@ jobs:
sed -i "s/^appVersion:.*/appVersion: ${{env.semVer}}/" deployment/helm/Chart.yaml
sed -i "s/:[0-9]\+\.[0-9]\+\.[0-9]\+/:${{env.semVer}}/" deployment/helm/values.yaml
- name: Push version updates and create tag
run: |
git add .
git commit -m "ci: version bump ${{env.semVer}}"
git tag ${{env.semVer}}
git push
git push origin tag ${{env.semVer}}
- name: Print version
run: "echo '${{ steps.release.outputs.version }}'"

0 comments on commit 95f25fa

Please sign in to comment.