-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (38 loc) · 1.57 KB
/
build-and-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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