Skip to content

Commit cc78290

Browse files
authored
chore: Update release.yml
1 parent 872d77c commit cc78290

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: release
2+
23
on:
34
workflow_dispatch:
45
inputs:
@@ -27,47 +28,32 @@ jobs:
2728

2829
runs-on: ubuntu-latest
2930

31+
env:
32+
MIX_ENV: test
33+
3034
steps:
3135
- name: Checkout
3236
uses: actions/checkout@v4
3337
with:
3438
ref: ${{ github.event.inputs.git-ref }}
3539

36-
- uses: oven-sh/setup-bun@v2
37-
with:
38-
bun-version: latest
39-
4040
- name: Set up Elixir
4141
uses: erlef/setup-beam@v1
4242
with:
4343
otp-version: ${{ matrix.otp }}
4444
elixir-version: ${{ matrix.elixir }}
4545

4646
- name: Install dependencies
47-
env:
48-
MIX_ENV: test
49-
run: |
50-
mix deps.get
51-
bun install
47+
run: mix deps.get
5248

5349
- name: Check source code format
5450
run: mix format --check-formatted
55-
if: ${{ matrix.lint }}
5651

5752
- name: Remove compiled application files
5853
run: mix clean
5954

60-
- name: Compile dependencies
61-
run: mix compile
62-
if: ${{ !matrix.lint }}
63-
env:
64-
MIX_ENV: test
65-
6655
- name: Compile & lint dependencies
6756
run: mix compile --warnings-as-errors
68-
if: ${{ matrix.lint }}
69-
env:
70-
MIX_ENV: test
7157

7258
- name: Run tests
7359
run: mix test
@@ -76,6 +62,10 @@ jobs:
7662
name: Publish release to hex.pm
7763
runs-on: ubuntu-latest
7864
needs: [ tests ]
65+
env:
66+
MIX_ENV: prod
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
7969
steps:
8070
- name: 🛑 Cancel Previous Runs
8171
uses: styfle/[email protected]
@@ -94,18 +84,12 @@ jobs:
9484
elixir-version: 1.18
9585

9686
- name: Install Deps
97-
env:
98-
MIX_ENV: prod
9987
run: |
10088
mix deps.get
10189
sed -i 's%@version "[0-9\.]\+"%@version "${{ github.event.inputs.release-version }}"%' mix.exs
10290
sed -i 's%{:phoenix_session_process, "~> [0-9\.]\+"}%{:phoenix_session_process, "~> ${{ github.event.inputs.release-version }}"}%' README.md
10391
10492
- name: Publish to hex.pm
105-
env:
106-
MIX_ENV: prod
107-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108-
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
10993
run: |
11094
mix hex.publish --yes
11195

0 commit comments

Comments
 (0)