ps install script change #14
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: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build binaries | |
| run: | | |
| # Service binaries | |
| GOOS=windows go build -o timekeep-service.exe ./cmd/service | |
| GOOS=linux go build -o timekeepd ./cmd/service | |
| # CLI binaries | |
| GOOS=windows go build -o timekeep.exe ./cmd/cli | |
| GOOS=linux go build -o timekeep ./cmd/cli | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p timekeep-release/windows timekeep-release/linux | |
| # Copy install scripts | |
| cp scripts/install.ps1 timekeep-release/ | |
| cp scripts/install.bat timekeep-release/ | |
| cp scripts/install.sh timekeep-release/ | |
| # Copy Windows binaries | |
| cp timekeep-service.exe timekeep-release/windows/ | |
| cp timekeep.exe timekeep-release/windows/ | |
| # Copy Linux binaries | |
| cp timekeepd timekeep-release/linux/ | |
| cp timekeep timekeep-release/linux/ | |
| cat > timekeep-release/README.txt << 'EOF' | |
| TimeKeep Installation | |
| ====================== | |
| 1. Extract this ZIP file | |
| 2. Run the appropriate install script: | |
| - Windows: Right-click install.ps1 - "Run with PowerShell" as Administrator | |
| - Linux: chmod +x install.sh && sudo ./install.sh | |
| The install script will handle everything automatically. | |
| EOF | |
| zip -r timekeep-${{ github.ref_name }}.zip timekeep-release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: timekeep-${{ github.ref_name }}.zip |