Skip to content

Release Generator

Release Generator #120

name: Release Generator
on:
workflow_run:
workflows: ["Release", "Sync"]
types:
- completed
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: Release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Getting Tag
id: tag_extractor
run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
- uses: ncipollo/release-action@v1
with:
name: Upsonic ${{ steps.tag_extractor.outputs.latest_tag }}
generateReleaseNotes: true
tag: ${{ steps.tag_extractor.outputs.latest_tag }}
sucess:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Getting Tag
id: tag_extractor
run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
- name: Discord Webhook Action
if: ${{ (needs.build.result == 'success') }}
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.RELEASE_WEBHOOK_URL }}
content: "success <@&1163402741394178162> ${{ steps.tag_extractor.outputs.latest_tag }}"
- name: Discord Webhook Action 2
if: ${{ (needs.build.result == 'failure') }}
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.RELEASE_WEBHOOK_URL }}
content: "failure <@&1163402741394178162> ${{ steps.tag_extractor.outputs.latest_tag }}"