Skip to content

Commit 623ad83

Browse files
authored
Merge pull request #3 from scribd/helen/SERF-2442/release
[SERF-2442] Add semantic release
2 parents 7b2a555 + 82e18be commit 623ad83

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- Test
7+
branches:
8+
- main
9+
types:
10+
- completed
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-22.04
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
with:
20+
persist-credentials: false
21+
22+
- name: Semantic Release
23+
id: semantic
24+
uses: cycjimmy/semantic-release-action@v3
25+
with:
26+
extra_plugins: |
27+
@semantic-release/[email protected]
28+
@semantic-release/[email protected]
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.SCRIBD_GITHUB_GENERIC_TOKEN }}
31+
32+
- name: Send notification
33+
if: steps.semantic.outputs.new_release_published == 'true'
34+
uses: scribd/job-notification@main
35+
with:
36+
token: ${{ secrets.SCRIBD_SLACK_GENERIC_TOKEN }}
37+
channel: service-foundations-release
38+
message: <https://github.com/${{ github.repository }}/tree/v${{ steps.semantic.outputs.new_release_version }}|Released version v${{ steps.semantic.outputs.new_release_version }}>

.releaserc.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
preset: angular
2+
3+
branches:
4+
- main
5+
6+
plugins:
7+
- "@semantic-release/commit-analyzer"
8+
- "@semantic-release/release-notes-generator"
9+
- - "@semantic-release/changelog"
10+
- changelogFile: CHANGELOG.md
11+
- - "@semantic-release/git"
12+
- assets:
13+
- CHANGELOG.md
14+
message: "chore: Release version ${nextRelease.version} [skip ci]"
15+
- - "@semantic-release/github"
16+
- successComment: false
17+
failComment: false
18+
labels: false
19+
releasedLabels: false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# job-notification
22

3-
[![Test](https://github.com/scribd/job-notification/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/scribd/job-notification/actions/workflows/test.yml)
3+
[![Test](https://github.com/scribd/job-notification/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/scribd/job-notification/actions/workflows/test.yml) [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
44

55
A GitHub Action for sending job notifications
66

0 commit comments

Comments
 (0)