esync

Directory watching and remote syncing
Log | Files | Refs | README | LICENSE

release.yml (1234B)


      1 name: Release
      2 
      3 on:
      4   push:
      5     tags:
      6       - "v*"
      7 
      8 permissions:
      9   contents: write
     10 
     11 jobs:
     12   build:
     13     runs-on: ubuntu-latest
     14     strategy:
     15       matrix:
     16         include:
     17           - goos: darwin
     18             goarch: arm64
     19             suffix: darwin-arm64
     20           - goos: linux
     21             goarch: amd64
     22             suffix: linux-amd64
     23     steps:
     24       - uses: actions/checkout@v4
     25 
     26       - uses: actions/setup-go@v5
     27         with:
     28           go-version-file: go.mod
     29 
     30       - name: Build
     31         env:
     32           GOOS: ${{ matrix.goos }}
     33           GOARCH: ${{ matrix.goarch }}
     34           CGO_ENABLED: "0"
     35         run: go build -ldflags="-s -w" -o esync-${{ matrix.suffix }} .
     36 
     37       - name: Upload artifact
     38         uses: actions/upload-artifact@v4
     39         with:
     40           name: esync-${{ matrix.suffix }}
     41           path: esync-${{ matrix.suffix }}
     42 
     43   release:
     44     needs: build
     45     runs-on: ubuntu-latest
     46     steps:
     47       - name: Download all artifacts
     48         uses: actions/download-artifact@v4
     49 
     50       - name: Create release
     51         uses: softprops/action-gh-release@v2
     52         with:
     53           generate_release_notes: true
     54           files: |
     55             esync-darwin-arm64/esync-darwin-arm64
     56             esync-linux-amd64/esync-linux-amd64