Skip to content

Commit 070b419

Browse files
committed
build(actions): explicitly set branches and environment variables
1 parent b8aa31d commit 070b419

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/action.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
uses: actions/checkout@v4
2525
with:
2626
path: ${{ env.PLUGIN_FOLDER }}
27+
- name: Checkout Plugin branch
28+
working-directory: ${{ env.PLUGIN_FOLDER }}
29+
run: |
30+
git checkout -B ${{ matrix.PLATFORM.RMQREF }}
2731
- name: Install Erlang and Elixir
2832
uses: erlef/setup-beam@v1
2933
with:
@@ -35,19 +39,22 @@ jobs:
3539
make
3640
- name: Run tests
3741
working-directory: ${{ env.PLUGIN_FOLDER }}
42+
env:
43+
MIX_ENV: 'test'
3844
run: |
39-
git checkout -B ${{ matrix.PLATFORM.RMQREF }}
4045
make tests
46+
- name: Build distribution files
47+
working-directory: ${{ env.PLUGIN_FOLDER }}
48+
env:
49+
MIX_ENV: 'prod'
50+
DIST_AS_EZS: 'yes'
51+
run: |
52+
make dist
4153
- name: Store test artifacts
4254
uses: actions/upload-artifact@v4
4355
with:
4456
name: tests-rmq${{ matrix.PLATFORM.RMQREF }}-erl${{ matrix.PLATFORM.ERLVER }}-elx${{ matrix.PLATFORM.ELXVER }}
4557
path: ${{ env.SERVER_FOLDER }}/logs/
46-
- name: Build distribution files
47-
working-directory: ${{ env.PLUGIN_FOLDER }}
48-
run: |
49-
git checkout -B ${{ matrix.PLATFORM.RMQREF }}
50-
MIX_ENV=prod DIST_AS_EZS=yes make dist
5158
- name: Store build artifacts
5259
uses: actions/upload-artifact@v4
5360
with:

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ app:: $(elixir_srcs) deps
2222
$(MIX) make_app
2323

2424
dist:: app
25+
echo $MIX_ENV
2526
mkdir -p $(DIST_DIR)
2627
$(MIX) make_archives
2728

2829
tests:: dist
30+
echo $MIX_ENV
2931
$(MIX) make_tests
3032

3133
clean::

0 commit comments

Comments
 (0)