build-snapshot #97
This file contains hidden or 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-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-15-intel | |
| steps: | |
| - name: Install Free Pascal | |
| uses: doublecmd/lazarus-install@mac | |
| with: | |
| lazarus-version: "stable" | |
| - name: Modify Free Pascal config | |
| run: | | |
| sudo echo "#ifdef cpuaarch64" >> /etc/fpc.cfg | |
| sudo echo " -WM10.15" >> /etc/fpc.cfg | |
| sudo echo "#endif" >> /etc/fpc.cfg | |
| - name: Get Lazarus source | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: 'fpc/Lazarus' | |
| - name: Build and install Lazarus | |
| run: make all install | |
| - name: Create Lazarus config | |
| run: | | |
| sudo mkdir -p /etc/lazarus | |
| sudo cp tools/install/macosx/environmentoptions.xml /etc/lazarus/environmentoptions.xml | |
| sudo sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" /etc/lazarus/environmentoptions.xml | |
| - name: Checkout source | |
| uses: actions/checkout@v5 | |
| 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: Deploy to snapshot server | |
| run: ./.github/scripts/upload_snapshot.sh | |
| env: | |
| SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }} | |
| REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
| REMOTE_USER: ${{ secrets.REMOTE_USER }} | |