Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add workflow to create release package based on debian #1000

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/release-debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Release - Debian

on:
workflow_dispatch:
inputs:
bundle:
description: "Bundle ID (next, self)"
required: true
default: "next"

jobs:
tagged-release:
runs-on: ubuntu-latest
container: debian:12
env:
MIX_ENV: prod

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Add Debian 11 repository and install OpenSSL 1.1
run: |
echo "deb http://deb.debian.org/debian bullseye main" | tee -a /etc/apt/sources.list.d/bullseye.list
apt update
apt install -y libssl1.1
rm /etc/apt/sources.list.d/bullseye.list
apt update

- name: Install Node.js
run: |
apt-get update
apt-get install -y curl git build-essential
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs

- name: Tag name
id: tag
run: echo "TAG=${{ github.event.inputs.bundle }}_$(date +%F)_${{ github.run_number }}" >> $GITHUB_ENV

- id: setup-elixir
uses: erlef/setup-elixir@v1
with:
otp-version: "25.3.2.7"
elixir-version: "1.14.0"

- name: Setup the Elixir project
run: |
mix deps.get
working-directory: core

- name: Build Frontend
run: |
./scripts/build-frontend
working-directory: core

- name: Build release
run: |
./scripts/build-release
working-directory: core
env:
BUNDLE: ${{ github.event.inputs.bundle }}
VERSION: ${{ env.TAG }}

- name: Archive release
run: |
tar cfj "../${{ env.TAG }}.tar.bz2" "${{ env.TAG }}"
working-directory: core

- name: Publish Release
uses: softprops/action-gh-release@v2
with:
tag_name: "${{ env.TAG }}"
prerelease: false
fail_on_unmatched_files: true
files: |
${{ env.TAG }}.tar.bz2
Loading