mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
155 lines
4.1 KiB
YAML
155 lines
4.1 KiB
YAML
name: build-snapshot
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- 'components/**'
|
|
- 'plugins/**'
|
|
- 'sdk/**'
|
|
- 'src/**'
|
|
branches:
|
|
- master
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-mac:
|
|
runs-on: macos-14
|
|
steps:
|
|
- name: Install Free Pascal
|
|
uses: doublecmd/lazarus-install@mac
|
|
with:
|
|
lazarus-version: "stable"
|
|
|
|
- name: Get Lazarus source
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: 'fpc/Lazarus'
|
|
|
|
- name: Build and install Lazarus
|
|
run: |
|
|
make all
|
|
sudo make install
|
|
|
|
- name: Create Lazarus config
|
|
run: |
|
|
mkdir -p $HOME/.lazarus
|
|
cp tools/install/macosx/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
|
|
sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
|
|
|
|
- name: Checkout source
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Prepare source
|
|
run: sed -i -e "s|BOX_CLIENT_SECRET = '\*'|BOX_CLIENT_SECRET = '$BOX_CLIENT_SECRET'|g" plugins/wfx/MacCloud/src/drivers/oauth2/box/uboxclient.pas
|
|
env:
|
|
BOX_CLIENT_SECRET: ${{ secrets.BOX_CLIENT_SECRET }}
|
|
|
|
- name: Build packages
|
|
run: ./.github/scripts/create_snapshot.sh
|
|
|
|
- name: Share data between jobs
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: snapshot-mac
|
|
retention-days: 1
|
|
compression-level: 0
|
|
path: doublecmd-release/doublecmd*.dmg
|
|
|
|
build-win:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Install Lazarus
|
|
uses: doublecmd/lazarus-install@win
|
|
with:
|
|
lazarus-version: "stable"
|
|
|
|
- name: Checkout source
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Restore timestamps
|
|
uses: chetan/git-restore-mtime-action@v2
|
|
|
|
- name: Build packages
|
|
run: ./.github/scripts/create_snapshot.bat
|
|
|
|
- name: Share data between jobs
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: snapshot-win
|
|
retention-days: 1
|
|
compression-level: 0
|
|
path: doublecmd-release/*
|
|
|
|
build-lin:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install fpc patchelf libgtk-3-dev libdbus-1-dev
|
|
|
|
- name: Get Lazarus source
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: 'fpc/Lazarus'
|
|
|
|
- name: Build and install Lazarus
|
|
run: |
|
|
make all
|
|
sudo make install
|
|
|
|
- name: Create Lazarus config
|
|
run: |
|
|
mkdir -p $HOME/.lazarus
|
|
cp tools/install/linux/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
|
|
sed -i -e "s|__LAZARUSDIR__|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
|
|
|
|
- name: Checkout source
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Build packages
|
|
run: ./.github/scripts/create_snapshot.lnx
|
|
|
|
- name: Share data between jobs
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: snapshot-lin
|
|
retention-days: 1
|
|
compression-level: 0
|
|
path: doublecmd-release/doublecmd*.tar.xz
|
|
|
|
upload:
|
|
needs: [build-win, build-mac, build-lin]
|
|
runs-on: ubuntu-latest
|
|
environment: snapshots
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
merge-multiple: true
|
|
|
|
- name: Save revision number
|
|
run: echo "REVISION=$(cat revision.txt)" >> "$GITHUB_ENV"
|
|
shell: bash
|
|
|
|
- name: Upload binaries to snapshots
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_name: doublecmd/snapshots
|
|
repo_token: ${{ secrets.SNAPSHOTS }}
|
|
file: ./*
|
|
release_name: Revision ${{ env.REVISION }}
|
|
tag: ${{ env.REVISION }}
|
|
body: ${{ vars.BODY }}
|
|
overwrite: true
|
|
file_glob: true
|