Skip to content

Commit

Permalink
release still needs build but release notes can be own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtharriger committed May 19, 2024
1 parent 77b7076 commit 62ef6ea
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 123 deletions.
71 changes: 68 additions & 3 deletions .github/workflows/ci-build-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: CI Build and Release

on:
push:
Expand All @@ -7,12 +7,13 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [amd64, arm64]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -38,5 +39,69 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: clj-mergetool-${{ matrix.os }}-${{ matrix.arch }}
path: target/clj-mergetool${{ matrix.os == 'windows-latest' && '.exe' || '' }}
path: target/clj-mergetool
if-no-files-found: error

release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.event.head_commit.message, 'Release') && github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download build artifacts for Linux amd64
uses: actions/download-artifact@v4
with:
name: clj-mergetool-ubuntu-latest-amd64
path: target/clj-mergetool-linux-amd64

- name: Download build artifacts for Linux arm64
uses: actions/download-artifact@v4
with:
name: clj-mergetool-ubuntu-latest-arm64
path: target/clj-mergetool-linux-arm64

- name: Download build artifacts for Windows amd64
uses: actions/download-artifact@v4
with:
name: clj-mergetool-windows-latest-amd64
path: target/clj-mergetool-windows-amd64.exe

- name: Download build artifacts for Windows arm64
uses: actions/download-artifact@v4
with:
name: clj-mergetool-windows-latest-arm64
path: target/clj-mergetool-windows-arm64.exe

- name: Download build artifacts for macOS amd64
uses: actions/download-artifact@v4
with:
name: clj-mergetool-macos-latest-amd64
path: target/clj-mergetool-macos-amd64

- name: Download build artifacts for macOS arm64
uses: actions/download-artifact@v4
with:
name: clj-mergetool-macos-latest-arm64
path: target/clj-mergetool-macos-arm64

- name: Download release notes
uses: actions/download-artifact@v4
with:
name: release-notes
path: RELEASE_NOTES.md

- name: Create Release
uses: softprops/action-gh-release@v1
with:
body_path: RELEASE_NOTES.md
files: |
target/clj-mergetool-linux-amd64
target/clj-mergetool-linux-arm64
target/clj-mergetool-windows-amd64.exe
target/clj-mergetool-windows-arm64.exe
target/clj-mergetool-macos-amd64
target/clj-mergetool-macos-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120 changes: 0 additions & 120 deletions .github/workflows/publish-release.yml

This file was deleted.

0 comments on commit 62ef6ea

Please sign in to comment.