Skip to content

Commit

Permalink
fix: Semantic release implementation (#4)
Browse files Browse the repository at this point in the history
* fix: release management using conventional commits and semantic-release
  • Loading branch information
NeillShazly committed Sep 30, 2022
1 parent 77678de commit 4c96b8d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/packer.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: Packer

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # matches vX.X.X versioning
on:
workflow_run:
workflows: [release]

jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'Starting Packer Build'
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'Packer Build Failed to Run'
packer:
runs-on: ubuntu-latest
name: packer
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ on:
paths:
- "*.hcl"
- ".github/workflows/release.yml"
- ".releaserc.yaml"
- ".releaserc.yml"
workflow_dispatch: {}

concurrency:
group: release

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -22,7 +19,7 @@ jobs:
newVersion: ${{ steps.release.outputs.newVersion }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Release
Expand Down
6 changes: 6 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
branches:
- main
repositoryUrl: https://github.com/liatrio/packer-azure-github-runner
preset: conventionalcommits
tagFormat: "v${version}"
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "conventional-release",
"version": "1.0.0",
"private": true,
"dependencies": {
"@liatrio/semantic-release-helm": "^2.0.0",
"@semantic-release/git": "^10.0.1",
"conventional-changelog-conventionalcommits": "^4.6.1",
"semantic-release": "^18.0.0"
}
}

0 comments on commit 4c96b8d

Please sign in to comment.