Skip to content

Commit 2b7e44e

Browse files
👷 Automatic releases
[PRERELEASE]
1 parent 9354dd4 commit 2b7e44e

File tree

1 file changed

+87
-9
lines changed

1 file changed

+87
-9
lines changed

.github/workflows/main.yml

Lines changed: 87 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- main
1111
- develop
1212

13+
env:
14+
PLUGIN_NAME: "ZePolA"
15+
1316
jobs:
1417
build:
1518
if: ${{ !contains(github.event.head_commit.message, '[CI SKIP]') }}
@@ -105,32 +108,107 @@ jobs:
105108

106109
- name: Move AU artifacts
107110
if: runner.os == 'MacOS'
108-
run: ./scripts/nest -cd ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.au_prefix }}${{ matrix.plugin_name }}.component
111+
run: ./scripts/nest -cd ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.au_prefix }}${{ env.PLUGIN_NAME }}.component
109112

110113
- name: Move VST3 artifacts
111-
run: ./scripts/nest -cd ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.vst3_prefix }}${{ matrix.plugin_name }}.vst3
114+
run: ./scripts/nest -cd ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.vst3_prefix }}${{ env.PLUGIN_NAME }}.vst3
112115

113116
- name: Move Standalone artifacts
114-
run: ./scripts/nest -cd ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.standalone_prefix }}${{ matrix.plugin_name }}${{ matrix.standalone_ext }}
117+
run: ./scripts/nest -cd ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.standalone_prefix }}${{ env.PLUGIN_NAME }}${{ matrix.standalone_ext }}
115118

116119
- name: Upload AU
117120
if: runner.os == 'MacOS'
118121
uses: actions/upload-artifact@v4
119122
with:
120-
name: ${{ matrix.plugin_name }}_${{ matrix.label }}_au
121-
path: ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.au_prefix }}${{ matrix.plugin_name }}.component
123+
name: ${{ env.PLUGIN_NAME }}_${{ matrix.label }}_au
124+
path: ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.au_prefix }}${{ env.PLUGIN_NAME }}.component
122125

123126
- name: Upload VST3
124127
uses: actions/upload-artifact@v4
125128
with:
126-
name: ${{ matrix.plugin_name }}_${{ matrix.label }}_vst3
127-
path: ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.vst3_prefix }}${{ matrix.plugin_name }}.vst3
129+
name: ${{ env.PLUGIN_NAME }}_${{ matrix.label }}_vst3
130+
path: ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.vst3_prefix }}${{ env.PLUGIN_NAME }}.vst3
128131

129132
- name: Upload Standalone
130133
uses: actions/upload-artifact@v4
131134
with:
132-
name: ${{ matrix.plugin_name }}_${{ matrix.label }}_standalone
133-
path: ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.standalone_prefix }}${{ matrix.plugin_name }}${{ matrix.standalone_ext }}
135+
name: ${{ env.PLUGIN_NAME }}_${{ matrix.label }}_standalone
136+
path: ${{ matrix.plugin_buildir }}/${{ matrix.build_prefix }}/${{ matrix.standalone_prefix }}${{ env.PLUGIN_NAME }}${{ matrix.standalone_ext }}
134137

135138
outputs:
136139
plugin_version: ${{ steps.plugin-version.outputs.PLUGIN_VERSION }}
140+
141+
release:
142+
if: ${{ contains(github.event.head_commit.message, '[RELEASE]') || contains(github.event.head_commit.message, '[PRERELEASE]') }}
143+
runs-on: ubuntu-latest
144+
needs: [build]
145+
146+
steps:
147+
- uses: actions/download-artifact@v4
148+
with:
149+
path: artifacts
150+
151+
- name: List artifacts
152+
run: tree artifacts
153+
154+
- name: Create release assets folder
155+
run: mkdir rassets
156+
157+
- name: Prepare folder for LIM Plugin Collection Specs zip file
158+
run: mkdir -p collection/Windows collection/MacOS collection/Linux
159+
160+
- name: Set permissions for Linux executable
161+
run: chmod +x artifacts/${{ env.PLUGIN_NAME }}_linux_standalone/${{ env.PLUGIN_NAME }}
162+
163+
- name: Set permissions for Mac executable
164+
run: chmod +x artifacts/${{ env.PLUGIN_NAME }}_macos_standalone/${{ env.PLUGIN_NAME }}.app/Contents/MacOS/${{ env.PLUGIN_NAME }}
165+
166+
- name: Compress assets
167+
working-directory: artifacts
168+
run: |
169+
for d in ${{ env.PLUGIN_NAME }}_*_* ; do
170+
cd "${d}" && \
171+
dest="../../rassets/${d}_v${{ needs.build.outputs.plugin_version }}.zip" && \
172+
echo zip -r "${dest}" * && \
173+
zip -r "${dest}" * && \
174+
cd ..
175+
done;
176+
177+
- name: Copy assets to zip folder
178+
run: |
179+
for d in artifacts/${{ env.PLUGIN_NAME }}_*_* ; do
180+
case "$d" in
181+
*_linux_*) ZIP_PREFIX="Linux/" ;;
182+
*_win_*) ZIP_PREFIX="Windows/" ;;
183+
*_macos_*) ZIP_PREFIX="MacOS/" ;;
184+
*) ZIP_PREFIX="" ;;
185+
esac && \
186+
dest="collection/${ZIP_PREFIX}" && \
187+
echo cp -r "${d}"/* "${dest}" && \
188+
cp -r "${d}"/* "${dest}"
189+
done;
190+
191+
- name: List zip folder
192+
run: tree collection
193+
194+
- name: Compress LIM Plugin Collection Specs zip file
195+
working-directory: collection
196+
run: zip -r ../rassets/${{ env.PLUGIN_NAME }}_v${{ needs.build.outputs.plugin_version }}.zip *
197+
198+
- name: List assets
199+
run: ls rassets
200+
201+
- uses: actions-ecosystem/action-push-tag@v1
202+
with:
203+
tag: v${{ needs.build.outputs.plugin_version }}
204+
message: ':bookmark: Version ${{ needs.build.outputs.plugin_version }}'
205+
206+
- name: Release
207+
uses: softprops/action-gh-release@v2
208+
with:
209+
tag_name: v${{ needs.build.outputs.plugin_version }}
210+
name: Version ${{ needs.build.outputs.plugin_version }}
211+
draft: true
212+
prerelease: ${{ contains(github.event.head_commit.message, '[PRERELEASE]') }}
213+
files:
214+
rassets/*

0 commit comments

Comments
 (0)