2
0

release.yml 917 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: release
  2. on:
  3. push:
  4. tags:
  5. - 'v*'
  6. workflow_dispatch:
  7. jobs:
  8. build:
  9. name: Build
  10. runs-on: ubuntu-latest
  11. permissions:
  12. contents: write
  13. steps:
  14. - name: Check out code into the Go module directory
  15. uses: actions/checkout@v4
  16. - name: Set up Go
  17. uses: actions/setup-go@v5
  18. with:
  19. go-version: '^1.23'
  20. id: go
  21. - name: Build
  22. run: |
  23. for i in linux-amd64 linux-arm64 linux-riscv64 linux-loong64; do
  24. make ARCH=$i all
  25. tar -cz --numeric-owner --owner root --group root -f tunasync-$i-bin.tar.gz -C build-$i tunasync tunasynctl
  26. done
  27. - name: Create Release
  28. uses: softprops/action-gh-release@v2
  29. with:
  30. token: ${{ secrets.GITHUB_TOKEN }}
  31. tag_name: ${{ github.ref_name }}
  32. name: Release ${{ github.ref_name }}
  33. prerelease: false
  34. files: |
  35. tunasync-*.tar.gz