Build Release #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Release | |
on: [create, workflow_dispatch] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v2 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: '1.15.0' | |
otp-version: '25' | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build/prod/lib/ | |
key: ${{ runner.os }}-otp25-ex1.15.0-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-otp25-ex1.15.0-${{ hashFiles('**/mix.lock') }} | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Compile release | |
run: | | |
mix compile | |
mix release | |
cp _build/prod/lichat-*.tar.gz lichat-${{ runner.os }}.tar.gz | |
env: | |
MIX_ENV: prod | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lichat-${{ runner.os }} | |
path: lichat-${{ runner.os }}.tar.gz | |
- name: Create release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
continue-on-error: true | |
with: | |
allowUpdates: true | |
name: Release ${{ github.ref_name }} | |
artifacts: lichat-${{ runner.os }}.tar.gz |