This repository was archived by the owner on Oct 11, 2025. It is now read-only.
More logging for x11 sessions #11
Workflow file for this run
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 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| build_success: ${{ steps.build_step.outputs.build_success }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.0' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpam0g-dev make | |
| - name: Build all binaries with Makefile | |
| id: build_step | |
| run: | | |
| make amd64 | |
| make package | |
| echo "build_success=true" >> $GITHUB_OUTPUT | |
| continue-on-error: true | |
| - name: Print version info | |
| if: steps.build_step.outputs.build_success == 'true' | |
| run: | | |
| ./bin/fancylock-linux-amd64 -v || echo "Version info not available" | |
| - name: Check if build succeeded | |
| if: steps.build_step.outputs.build_success != 'true' | |
| run: exit 1 | |
| - name: Upload dist/ artifacts | |
| if: steps.build_step.outputs.build_success == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fancylock-artifacts | |
| path: dist/ | |
| retention-days: 1 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: needs.build.outputs.build_success == 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: fancylock-artifacts | |
| path: dist/ | |
| - name: Get commit message for release notes | |
| id: get_release_notes | |
| run: | | |
| echo "release_notes<<EOF" >> $GITHUB_OUTPUT | |
| git log -1 --pretty=%B >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| body: ${{ steps.get_release_notes.outputs.release_notes }} | |
| files: dist/*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |