-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/feature/ci-release-on-debian' in…
…to tn-debian
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
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:11 | ||
env: | ||
MIX_ENV: prod | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- 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 |
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