build-snapshot #147
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-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/* | |
| upload: | |
| needs: [build-win] | |
| 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: alexx2000/snapshots | |
| repo_token: ${{ secrets.SNAPSHOTS }} | |
| file: ./* | |
| release_name: Revision ${{ env.REVISION }} | |
| tag: ${{ env.REVISION }} | |
| body: ${{ vars.BODY }} | |
| overwrite: true | |
| file_glob: true |