artifacts.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Publish Artifacts
  2. on:
  3. issue_comment:
  4. types: [created]
  5. jobs:
  6. publish-artifacts:
  7. if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/generate-artifacts')
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Set up Go 1.18
  11. uses: actions/setup-go@v2
  12. with:
  13. go-version: 1.18.3
  14. id: go
  15. - name: Checkout code into the Go module directory
  16. uses: actions/checkout@v2
  17. - uses: actions/cache@v2
  18. with:
  19. path: ~/go/pkg/mod
  20. key: go-${{ hashFiles('**/go.sum') }}
  21. - name: Build cross platform compose-plugin binaries
  22. run: make -f builder.Makefile cross
  23. - name: Upload macos-amd64 binary
  24. uses: actions/upload-artifact@v2
  25. with:
  26. name: docker-compose-darwin-amd64
  27. path: ${{ github.workspace }}/bin/docker-compose-darwin-amd64
  28. - name: Upload macos-arm64 binary
  29. uses: actions/upload-artifact@v2
  30. with:
  31. name: docker-compose-darwin-arm64
  32. path: ${{ github.workspace }}/bin/docker-compose-darwin-arm64
  33. - name: Upload linux-amd64 binary
  34. uses: actions/upload-artifact@v2
  35. with:
  36. name: docker-compose-linux-amd64
  37. path: ${{ github.workspace }}/bin/docker-compose-linux-amd64
  38. - name: Upload linux-ppc64le binary
  39. uses: actions/upload-artifact@v2
  40. with:
  41. name: docker-compose-linux-ppc64le
  42. path: ${{ github.workspace }}/bin/docker-compose-linux-ppc64le
  43. - name: Upload windows-amd64 binary
  44. uses: actions/upload-artifact@v2
  45. with:
  46. name: docker-compose-windows-amd64.exe
  47. path: ${{ github.workspace }}/bin/docker-compose-windows-amd64.exe
  48. - name: Update comment
  49. uses: peter-evans/create-or-update-comment@v1
  50. with:
  51. comment-id: ${{ github.event.comment.id }}
  52. body: |
  53. This PR can be tested using [binaries](https://github.com/docker/compose-cli/actions/runs/${{ github.run_id }}).
  54. reactions: eyes