This repository has been archived by the owner on Sep 14, 2024. It is now read-only.
aa2 #565
Workflow file for this run
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
name: Build NosoWallet | |
on: | |
push: | |
branches: [ main ] | |
tags: [ "*" ] | |
paths-ignore: [ "README.md", "changelog.txt", "releasenotes.txt" ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-20.04, ubuntu-latest, windows-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/dcpcrypt-2.0.4.1/dcpcrypt.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 "Noso.lpi" | |
- name: Build the Main App (Ubuntu) | |
if: ${{ matrix.operating-system == 'ubuntu-latest' }} | |
run: | | |
lazbuild -B --bm=Release "Noso.lpi" | |
- name: Build the Main App (Ubuntu) | |
if: ${{ matrix.operating-system == 'ubuntu-20.04' }} | |
run: | | |
lazbuild -B --bm=Release "Noso.lpi" | |
- name: Upload binary (Windows) | |
if: ${{ (matrix.operating-system == 'windows-latest') && (matrix.lazarus-versions == 'stable') }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: noso-windows | |
path: Noso.exe | |
- name: Upload binary (Ubuntu) | |
if: ${{ (matrix.operating-system == 'ubuntu-latest') && (matrix.lazarus-versions == 'stable') }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: noso-linuxnew | |
path: Noso | |
- name: Upload binary (Ubuntu) | |
if: ${{ (matrix.operating-system == 'ubuntu-20.04') && (matrix.lazarus-versions == 'stable') }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: noso-linux | |
path: Noso | |
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 -al | |
ls -al noso-windows | |
ls -al noso-linuxnew | |
ls -al noso-linux | |
- name: Package Windows | |
run: | | |
cp noso-windows/Noso.exe . | |
tag=${{ github.event.ref }} | |
tag=${tag#"refs/tags/"} | |
zip noso-${tag}-x86_64-win64.zip Noso.exe | |
- name: Package Ubuntu latest | |
run: | | |
cp noso-linuxnew/Noso . | |
tag=${{ github.event.ref }} | |
tag=${tag#"refs/tags/"} | |
chmod +x Noso | |
tar -zcvf noso-${tag}-x86_64-linuxnew.tgz Noso | |
zip -r noso-${tag}-x86_64-linuxnew.zip Noso | |
- name: Package Ubuntu 20.04 | |
run: | | |
cp noso-linux/Noso . | |
tag=${{ github.event.ref }} | |
tag=${tag#"refs/tags/"} | |
chmod +x Noso | |
tar -zcvf noso-${tag}-x86_64-linux.tgz Noso | |
zip -r noso-${tag}-x86_64-linux.zip Noso | |
- name: Upload Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: releasenotes.txt | |
files: | | |
noso-*.zip | |
noso-*.tgz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |