release.yaml 1.2 KB

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