Skip to content

Test commit

Test commit #14

name: Build and Release Installers
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set Repo Name and Release Tag
run: |
echo "REPO_NAME=$(basename $GITHUB_REPOSITORY)" >> $GITHUB_ENV
echo "RELEASE_TAG=$(cat version.txt)" >> $GITHUB_ENV
- name: Compose Release Notes
run: |
echo "Release notes for $RELEASE_TAG." > release_notes.txt
git log --pretty=format:"- [%h](https://github.com/$GITHUB_REPOSITORY/commit/%H) %s%n" -10 >> release_notes.txt
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install p7zip-full nsis gh
- name: Make scripts executable
run: |
chmod +x scripts/build-and-release/create-linux-installer.sh
chmod +x scripts/build-and-release/create-windows-installer.sh
- name: Create Linux Installer
run: scripts/build-and-release/create-linux-installer.sh $GITHUB_REPOSITORY $RELEASE_TAG
- name: Create Windows Installer
run: scripts/build-and-release/create-windows-installer.sh
- name: Build NSIS Installer
run: makensis build/installer.nsi -DREPO_NAME=$REPO_NAME
- name: Create GitHub Release
run: |
gh auth login --with-token <<< "${{ secrets.RELEASE_TOKEN }}"
gh release create $RELEASE_TAG build/installer-windows.exe build/installer-linux.sh build/config.tar.gz -t "$RELEASE_TAG" -F release_notes.txt