Skip to content

Commit

Permalink
[#94] Add Release publishing reusable workflow (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan authored Jan 20, 2024
1 parent 3c57e3c commit 8ed5844
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Publish Release

on:
push:
tags:
- "v*"

jobs:

PublishRelease:
uses: Oztechan/Global/.github/workflows/reusable-publish.yml@develop
secrets: inherit
38 changes: 38 additions & 0 deletions .github/workflows/reusable-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Release

on:
workflow_call:

jobs:

PublishRelease:
runs-on: ubuntu-latest
outputs:
status: ${{ steps.status.outputs.status }}
steps:

- name: PublishRelease
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false

- name: Set Job Status
id: status
run: echo "status=success" >> $GITHUB_OUTPUT

Notify:
runs-on: ubuntu-latest
needs: [ PublishRelease ]
if: always()
steps:

- name: Notify slack fail
if: false == (needs.PublishRelease.outputs.status == 'success')
uses: voxmedia/github-action-slack-notify-build@v1.6.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel: ccc-github
status: FAILED
color: danger

0 comments on commit 8ed5844

Please sign in to comment.