Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Workflow file for this run

name: Build NosoLite
on:
push:
branches: [ main ]
tags: [ "*" ]
paths-ignore: [ "README.md", "changelog.txt", "releasenotes.txt" ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
name: Build and/or Test
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
lazarus-versions: [ stable]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
clean: true
set-safe-directory: true
- name: Install Lazarus
uses: gcarreno/[email protected]
with:
lazarus-version: ${{ matrix.lazarus-versions }}
with-cache: false
- name: Unzip packages
run: unzip -q Packages/\*.zip -d Packages
- name: Install packages
run: |
lazbuild -qqq Packages/Indy10/indylaz.lpk
lazbuild -qqq Packages/HashLib/src/Packages/FPC/HashLib4PascalPackage.lpk
lazbuild -qqq Packages/SimpleBaseLib/src/Packages/FPC/SimpleBaseLib4PascalPackage.lpk
lazbuild -qqq Packages/CryptoLib4Pascal-master/CryptoLib/src/Packages/FPC/CryptoLib4PascalPackage.lpk
lazbuild -qqq Packages/lazbarcodes/packages/lazbarcodes_runtimeonly.lpk
lazbuild -qqq Packages/lazbarcodes/packages/lazbarcodes.lpk
- name: Build the Main App (Windows)
if: ${{ matrix.operating-system == 'windows-latest' }}
run: |
lazbuild -B --bm=Release "nosolite.lpi"
mv nosolite.exe nosolite-x86_64-win64.exe
- name: Build the Main App (Ubuntu)
if: ${{ matrix.operating-system == 'ubuntu-latest' }}
run: |
lazbuild -B --bm=Release "nosolite.lpi"
mv nosolite nosolite-x86_64-linux
- name: Build the Main App (macOS)
if: ${{ matrix.operating-system == 'macos-latest' }}
run: |
lazbuild -B --bm=Release --ws="cocoa" "nosolite.lpi"
mv nosolite nosolite-x86_64-darwin
- name: Upload binary (Windows)
if: ${{ (matrix.operating-system == 'windows-latest') && (matrix.lazarus-versions == 'stable') }}
uses: actions/upload-artifact@v2
with:
name: nosolite
path: nosolite-x86_64-win64.exe
- name: Upload binary (Ubuntu)
if: ${{ (matrix.operating-system == 'ubuntu-latest') && (matrix.lazarus-versions == 'stable') }}
uses: actions/upload-artifact@v2
with:
name: nosolite
path: nosolite-x86_64-linux
- name: Upload binary (macOS)
if: ${{ (matrix.operating-system == 'macos-latest') && (matrix.lazarus-versions == 'stable') }}
uses: actions/upload-artifact@v2
with:
name: nosolite
path: nosolite-x86_64-darwin
package-release:
if: contains(github.ref, '/tags/')
name: Package and create GitHub Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> ${GITHUB_OUTPUT}
- name: Download the Release binary
uses: actions/download-artifact@v2
- name: List files
run: ls -alF nosolite
- name: Create release files
run: |
cd nosolite
chmod +x nosolite-x86_64-linux nosolite-x86_64-darwin
zip -r nosolite-${{ steps.vars.outputs.tag }}-x86_64-win64.zip nosolite-x86_64-win64.exe
tar -zcvf nosolite-${{ steps.vars.outputs.tag }}-x86_64-linux.tar.gz nosolite-x86_64-linux
tar -zcvf nosolite-${{ steps.vars.outputs.tag }}-x86_64-darwin.tar.gz nosolite-x86_64-darwin
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
name: nosolite ${{ steps.vars.outputs.tag }}
body_path: releasenotes.txt
files: |
nosolite/*.tar.gz
nosolite/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}