artifacts.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.16
  11. uses: actions/setup-go@v2
  12. with:
  13. go-version: 1.16
  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 windows-amd64 binary
  39. uses: actions/upload-artifact@v2
  40. with:
  41. name: docker-compose-windows-amd64.exe
  42. path: ${{ github.workspace }}/bin/docker-compose-windows-amd64.exe
  43. - name: Update comment
  44. uses: peter-evans/create-or-update-comment@v1
  45. with:
  46. comment-id: ${{ github.event.comment.id }}
  47. body: |
  48. This PR can be tested using [binaries](https://github.com/docker/compose-cli/actions/runs/${{ github.run_id }}).
  49. reactions: eyes