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

Commit

Permalink
reinstalling actions
Browse files Browse the repository at this point in the history
  • Loading branch information
NosoDevTeam committed Aug 29, 2023
1 parent 337a46c commit cb69cff
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'nightly artifacts cleanup'
on:
schedule:
- cron: '0 0 * * *' # Run at midnight

jobs:
delete-artifacts:
runs-on: ubuntu-latest
steps:
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 0 # Set this to 0 to delete all artifacts
137 changes: 137 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
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:
files: |
noso-*.zip
noso-*.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cb69cff

Please sign in to comment.