Skip to content

Commit 53917ec

Browse files
committed
CI: simplified if conditional expressions, added release-test branch
release-test branch is intended to be used on a user repository, not upstream, to test builds before tagging.
1 parent 9392c2d commit 53917ec

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/build.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
ninja-build \
106106
libjack-jackd2-dev
107107
- name: Install abseil
108-
if: ${{ github.ref_type == 'branch' }}
108+
if: github.ref_type == 'branch'
109109
run: |
110110
sudo apt-get install \
111111
libabsl-dev \
@@ -160,13 +160,13 @@ jobs:
160160
)
161161
cmake "${options[@]}"
162162
- name: Create tarball
163-
if: ${{ github.ref_type == 'tag' }}
163+
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
164164
run: |
165165
DESTDIR="$(pwd)/${{ env.install_name }}" \
166166
cmake --build build --config ${{ env.build_type }} --target install
167167
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
168168
- name: Upload
169-
if: ${{ github.ref_type == 'tag' }}
169+
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
170170
uses: actions/upload-artifact@v3
171171
with:
172172
name: Linux tarball
@@ -184,7 +184,7 @@ jobs:
184184
with:
185185
submodules: recursive
186186
- name: Install dependencies
187-
if: ${{ github.ref_type == 'branch' }}
187+
if: github.ref_type == 'branch'
188188
run: brew install abseil
189189
- name: Configure CMake
190190
run: |
@@ -233,13 +233,13 @@ jobs:
233233
)
234234
cmake "${options[@]}"
235235
- name: Create tarball
236-
if: ${{ github.ref_type == 'tag' }}
236+
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
237237
run: |
238238
DESTDIR="$(pwd)/${{ env.install_name }}" \
239239
cmake --build build --config ${{ env.build_type }} --target install
240240
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
241241
- name: Upload
242-
if: ${{ github.ref_type == 'tag' }}
242+
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
243243
uses: actions/upload-artifact@v3
244244
with:
245245
name: macOS tarball
@@ -299,17 +299,17 @@ jobs:
299299
--parallel 2 `
300300
--verbose `
301301
- name: Create zip package
302-
if: ${{ github.ref_type == 'tag' }}
302+
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
303303
run: 7z a "${{ env.install_name }}.zip" ".\build\library\*"
304304
- name: Upload
305-
if: ${{ github.ref_type == 'tag' }}
305+
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
306306
uses: actions/upload-artifact@v3
307307
with:
308308
name: ${{ matrix.pkg_platform }} zip package
309309
path: "${{ github.workspace }}/${{ env.install_name }}.zip"
310310

311311
archive_source_code:
312-
if: ${{ github.ref_type == 'tag' }}
312+
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
313313
name: Source code archive
314314
runs-on: ubuntu-20.04
315315
timeout-minutes: 2
@@ -415,12 +415,12 @@ jobs:
415415
make -C "${{ github.workspace }}" -f simple.mk
416416
417417
deploy:
418-
if: ${{ github.ref_type == 'tag' }}
418+
if: github.ref_type == 'tag'
419419
runs-on: ubuntu-20.04
420420
needs:
421421
- build_for_linux
422422
- build_for_macos
423-
# - build_for_mod
423+
# build_for_mod
424424
- build_for_windows
425425
- archive_source_code
426426
steps:

0 commit comments

Comments
 (0)