Skip to content

Commit 181bb75

Browse files
committed
ci: adds release workflow.
1 parent 79303f2 commit 181bb75

4 files changed

Lines changed: 44 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ 'v*' ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
test-lifecycle:
15+
uses: ./.github/workflows/test-lifecycle.yml
16+
17+
test-config:
18+
uses: ./.github/workflows/test-config.yml
19+
20+
release:
21+
needs: [test-lifecycle, test-config]
22+
if: startsWith(github.ref, 'refs/tags/')
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Get Changelog Entries
30+
uses: release-tools/since@707ab359a9d7f14e5d19126ec19e3fe218b8cbcc
31+
with:
32+
output-file: version_changelog.txt
33+
34+
- name: Create Release
35+
uses: softprops/action-gh-release@v1
36+
with:
37+
body_path: version_changelog.txt
38+
draft: false
39+
prerelease: false

.github/workflows/test-config.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: Test Config File
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
4+
workflow_call:
85

96
jobs:
107
test-config:
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
name: Test Actions
1+
name: Test Lifecycle
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
4+
workflow_call:
85

96
jobs:
107
test-setup:
@@ -66,7 +63,7 @@ jobs:
6663
6764
# Stop mock server
6865
- name: Test Stop Mocks Action
69-
uses: ./stop-mocks
66+
uses: ./stop-mocks
7067

7168
- name: Verify Server Stopped
7269
run: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Imposter GitHub Actions [![Test Actions](https://github.com/imposter-project/imposter-github-action/actions/workflows/test.yml/badge.svg)](https://github.com/imposter-project/imposter-github-action/actions/workflows/test.yml)
1+
# Imposter GitHub Actions [![CI/CD](https://github.com/imposter-project/imposter-github-action/actions/workflows/ci.yml/badge.svg)](https://github.com/imposter-project/imposter-github-action/actions/workflows/ci.yml)
22

33
This repository contains official GitHub Actions for [Imposter](https://www.imposter.sh), a modern mock server designed for microservice development and testing. These actions allow you to seamlessly integrate Imposter into your GitHub Actions workflows.
44

0 commit comments

Comments
 (0)