Skip to content

Commit b6f5eff

Browse files
committed
cleaup github actions
1 parent ef8795c commit b6f5eff

File tree

2 files changed

+129
-5
lines changed

2 files changed

+129
-5
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Deploy Release
1+
name: Deploy a nightly release
22

33
on:
44
push:
@@ -96,14 +96,18 @@ jobs:
9696
with:
9797
path: artifacts/
9898

99-
- name: Display structure of downloaded files
100-
run: ls -R artifacts
99+
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
100+
with:
101+
delete_release: true
102+
tag_name: nightly
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101105

102106
- name: Package and Upload Release
103107
uses: softprops/action-gh-release@v1
104108
with:
105-
name: ${{ env.TAG_NAME }}
106-
tag_name: ${{ env.TAG_NAME }}
109+
name: "ReaCoMa Nightly"
110+
tag_name: nightly
107111
body: "ReaCoMa built from: ${{ github.sha }}"
108112
files: |
109113
artifacts/macos-artifact/ReaCoMa-MacOS.dmg

.github/workflows/release.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Create Manual Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch_name:
7+
description: 'The branch to build and release from'
8+
required: true
9+
default: 'main'
10+
11+
jobs:
12+
build-macos:
13+
name: Build on macOS
14+
if: github.repository == 'flucoma/ReaCoMa'
15+
runs-on: macos-latest
16+
outputs:
17+
commit_sha: ${{ steps.get_sha.outputs.COMMIT_SHA }}
18+
steps:
19+
- name: Check out code
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.event.inputs.branch_name }}
23+
submodules: 'recursive'
24+
fetch-depth: 0
25+
26+
- name: Get Commit SHA
27+
id: get_sha
28+
run: echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
29+
30+
- name: Install Tools with Mise
31+
uses: jdx/mise-action@v2
32+
with:
33+
install: true
34+
cache: true
35+
36+
- name: Build Project
37+
run: mise run deploy
38+
39+
- name: Sign and Notarise
40+
uses: flucoma/actions/distribution@main
41+
with:
42+
glob: '-e dylib'
43+
package: 'ReacomaExtension/build/dist'
44+
output_type: 'dmg'
45+
output: 'ReaCoMa-MacOS'
46+
cert: ${{ secrets.CERT }}
47+
certpwd: ${{ secrets.CERTPWD }}
48+
teamid: ${{ secrets.WWDRTEAMID }}
49+
apppwd: ${{ secrets.APPSTORECONNECTPWD }}
50+
appusr: ${{ secrets.APPSTORECONNECTUSERNAME }}
51+
52+
- name: Upload macOS Artifact
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: macos-artifact
56+
path: ReacomaExtension/build/dist/ReaCoMa-MacOS.dmg
57+
58+
build-windows:
59+
name: Build on Windows
60+
if: github.repository == 'flucoma/ReaCoMa'
61+
runs-on: windows-latest
62+
steps:
63+
- name: Check out code
64+
uses: actions/checkout@v4
65+
with:
66+
ref: ${{ github.event.inputs.branch_name }} # Use the branch from the input
67+
submodules: 'recursive'
68+
fetch-depth: 0
69+
70+
- name: Install Tools with Mise
71+
uses: jdx/mise-action@v2
72+
with:
73+
install: true
74+
cache: true
75+
76+
- name: Setup MSVC Developer Command Prompt
77+
uses: ilammy/msvc-dev-cmd@v1
78+
79+
- name: Build Project
80+
run: mise run deploy-windows
81+
82+
# TODO: Windows signing? :-(
83+
84+
- name: Package Windows Build
85+
shell: pwsh
86+
run: |
87+
Compress-Archive -Path ReacomaExtension/build/dist/reaper_ReacomaExtension.dll -DestinationPath ReaCoMa-Windows.zip
88+
89+
- name: Upload Windows Artifact
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: windows-artifact
93+
path: ReaCoMa-Windows.zip
94+
95+
release:
96+
name: Create GitHub Release
97+
if: github.repository == 'flucoma/ReaCoMa'
98+
runs-on: ubuntu-latest
99+
needs: [build-macos, build-windows]
100+
steps:
101+
- name: Get short SHA
102+
id: get_sha
103+
run: echo "SHORT_SHA=$(echo ${{ needs.build-macos.outputs.commit_sha }} | cut -c1-7)" >> $GITHUB_ENV
104+
105+
- name: Download all artifacts
106+
uses: actions/download-artifact@v4
107+
with:
108+
path: artifacts/
109+
110+
- name: Package and Upload Release
111+
uses: softprops/action-gh-release@v1
112+
with:
113+
name: "ReaCoMa Build (${{ env.SHORT_SHA }})"
114+
tag_name: "release-${{ env.SHORT_SHA }}"
115+
body: "ReaCoMa built from commit: ${{ needs.build-macos.outputs.commit_sha }}" # Body includes the full SHA
116+
files: |
117+
artifacts/macos-artifact/ReaCoMa-MacOS.dmg
118+
artifacts/windows-artifact/ReaCoMa-Windows.zip
119+
prerelease: true
120+
draft: false

0 commit comments

Comments
 (0)