Skip to content

Pop args not allowed #47

Pop args not allowed

Pop args not allowed #47

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Elixir CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
concurrency:
group: live-xl-build-test-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: write
jobs:
build:
name: Build and test
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
runs-on: ["ubuntu-22.04", "ubuntu-20.04"]
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.15.2" # [Required] Define the Elixir version
otp-version: "25" # [Required] Define the Erlang/OTP version
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run tests
run: mix test
- name: Release
env:
MIX_ENV: prod
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }}
run: |
mix compile
mix assets.deploy
mix phx.gen.release
mix release
- name: "Tar files"
id: archive
run: |
formatted_date=$(date +'%Y%m%d%H%M')
archive_file="live_xl_rel_${{ matrix.runs-on }}_${formatted_date}.tar"
archive_file_full="${PWD}/${archive_file}"
cd _build/prod/rel
tar -cvf ${archive_file_full} live_xl
echo "archive_file=${archive_file}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.archive.outputs.archive_file }}
path: ${{ steps.archive.outputs.archive_file }}
retention-days: 5
- name: Release current commit
uses: ncipollo/release-action@v1.12.0
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'publish_release')
with:
artifacts: ${{ steps.archive.outputs.archive_file }}
token: "${{ secrets.GITHUB_TOKEN }}"
tag: "latest"
name: "latest"
removeArtifacts: false
allowUpdates: true
replacesArtifacts: true
makeLatest: true