2
0

release.yml 959 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. TAG=$(git describe --tags)
  24. for i in linux-amd64 linux-arm64 linux-riscv64 linux-loong64; do
  25. make ARCH=$i all
  26. tar -cz --numeric-owner --owner root --group root -f tunasync-${TAG}-$i-bin.tar.gz -C build-$i tunasync tunasynctl
  27. done
  28. - name: Create Release
  29. uses: softprops/action-gh-release@v2
  30. with:
  31. token: ${{ secrets.GITHUB_TOKEN }}
  32. tag_name: ${{ github.ref_name }}
  33. name: Release ${{ github.ref_name }}
  34. prerelease: false
  35. files: |
  36. tunasync-*.tar.gz