cli-release.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Releaser
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. tag:
  6. description: 'Release Tag'
  7. required: true
  8. dry-run:
  9. description: 'Dry run'
  10. required: false
  11. default: 'true'
  12. jobs:
  13. release:
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Set up Go 1.16
  17. uses: actions/setup-go@v2
  18. with:
  19. go-version: 1.16
  20. id: go
  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: Checkout code into the Go module directory
  26. uses: actions/checkout@v2
  27. - uses: actions/cache@v2
  28. with:
  29. path: ~/go/pkg/mod
  30. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  31. restore-keys: |
  32. ${{ runner.os }}-go-
  33. - name: Build
  34. run: make -f builder.Makefile cross
  35. - name: License
  36. run: cp packaging/* bin/
  37. - uses: ncipollo/release-action@v1
  38. if: ${{ github.event.inputs.dry-run != 'true' }}
  39. with:
  40. artifacts: "bin/*"
  41. prerelease: true
  42. token: ${{ secrets.GITHUB_TOKEN }}
  43. tag: ${{ github.event.inputs.tag }}