release.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Releaser
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. tag:
  6. description: "Release Tag"
  7. required: true
  8. jobs:
  9. upload-release:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Set up Go 1.17
  13. uses: actions/setup-go@v2
  14. with:
  15. go-version: 1.17
  16. id: go
  17. - name: Setup docker CLI
  18. run: |
  19. curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
  20. sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
  21. - name: Checkout code into the Go module directory
  22. uses: actions/checkout@v2
  23. - uses: actions/cache@v2
  24. with:
  25. path: ~/go/pkg/mod
  26. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  27. restore-keys: |
  28. ${{ runner.os }}-go-
  29. - name: Build
  30. run: make GIT_TAG=${{ github.event.inputs.tag }} -f builder.Makefile cross
  31. - name: Compute checksums
  32. run: cd bin; for f in *; do shasum --binary --algorithm 256 $f | tee -a checksums.txt > $f.sha256; done
  33. - name: License
  34. run: cp packaging/* bin/
  35. - uses: ncipollo/release-action@v1
  36. with:
  37. artifacts: "bin/*"
  38. generateReleaseNotes: true
  39. draft: true
  40. commit: "v2"
  41. token: ${{ secrets.GITHUB_TOKEN }}
  42. tag: ${{ github.event.inputs.tag }}