From 96b05bb47a993e6d561bfab4b65bc02b4bf77069 Mon Sep 17 00:00:00 2001
From: Felix Boerner <ich@felix-boerner.de>
Date: Sat, 13 Jan 2024 17:39:23 +0000
Subject: [PATCH] ci: reuse workflows

---
 .github/workflows/release.yml |   50 ++------------------------------------------------
 1 files changed, 2 insertions(+), 48 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4305b4b..fdcd71c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -2,7 +2,7 @@
 'on':
   workflow_run:
     workflows:
-      - Tests
+      - Test
     branches:
       - master
     types:
@@ -10,51 +10,5 @@
 jobs:
   release:
     name: Release
-    runs-on: ubuntu-latest
     if: ${{ github.event.workflow_run.conclusion == 'success' }}
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v4
-        with:
-          fetch-depth: 0
-
-      - name: Check for Go files
-        id: check_go
-        uses: andstor/file-existence-action@v2
-        with:
-          files: "**/*.go"
-
-      - name: Fetch all tags
-        if: steps.check_go.outputs.files_exists == 'true'
-        run: git fetch --force --tags
-
-      - name: Set up Go
-        if: steps.check_go.outputs.files_exists == 'true'
-        uses: actions/setup-go@v5
-        with:
-          go-version: 'stable'
-
-      - name: Install GoReleaser
-        if: steps.check_go.outputs.files_exists == 'true'
-        uses: goreleaser/goreleaser-action@v5
-        with:
-          install-only: true
-
-      - name: Set up Node.js
-        uses: actions/setup-node@v4
-        with:
-          node-version: 'lts/*'
-
-      - name: Install semantic-release
-        run: |
-          npm install -g semantic-release conventional-changelog-conventionalcommits
-
-      - name: Create Github release
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        run: |
-          if [[ "${{ steps.check_go.outputs.files_exists }}" == "true" ]]; then
-            npx -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/git semantic-release
-          else
-            npx semantic-release
-          fi
+    uses: escalate/github-actions-workflows/.github/workflows/release-go.yml@master

--
Gitblit v1.10.0