|
| 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 | + |
| 16 | + - name: Checkout code into the Go module directory |
| 17 | + uses: actions/checkout@v2 |
| 18 | + |
| 19 | + - uses: actions/cache@v2 |
| 20 | + with: |
| 21 | + path: ~/go/pkg/mod |
| 22 | + key: go-${{ hashFiles('**/go.sum') }} |
| 23 | + |
| 24 | + - name: Build cross platform compose-plugin binaries |
| 25 | + run: make -f builder.Makefile cross |
| 26 | + |
| 27 | + - name: Upload macos-amd64 binary |
| 28 | + uses: actions/upload-artifact@v2 |
| 29 | + with: |
| 30 | + name: docker-compose-darwin-amd64 |
| 31 | + path: ${{ github.workspace }}/bin/docker-compose-darwin-amd64 |
| 32 | + |
| 33 | + - name: Upload macos-arm64 binary |
| 34 | + uses: actions/upload-artifact@v2 |
| 35 | + with: |
| 36 | + name: docker-compose-darwin-arm64 |
| 37 | + path: ${{ github.workspace }}/bin/docker-compose-darwin-arm64 |
| 38 | + |
| 39 | + - name: Upload linux-amd64 binary |
| 40 | + uses: actions/upload-artifact@v2 |
| 41 | + with: |
| 42 | + name: docker-compose-linux-amd64 |
| 43 | + path: ${{ github.workspace }}/bin/docker-compose-linux-amd64 |
| 44 | + |
| 45 | + - name: Upload windows-amd64 binary |
| 46 | + uses: actions/upload-artifact@v2 |
| 47 | + with: |
| 48 | + name: docker-compose-windows-amd64.exe |
| 49 | + path: ${{ github.workspace }}/bin/docker-compose-windows-amd64.exe |
| 50 | + |
| 51 | + - name: Update comment |
| 52 | + uses: peter-evans/create-or-update-comment@v1 |
| 53 | + with: |
| 54 | + comment-id: ${{ github.event.comment.id }} |
| 55 | + body: | |
| 56 | + This PR can be tested using [binaries](https://github.com/docker/compose-cli/actions/runs/${{ github.run_id }}). |
| 57 | + reactions: eyes |
0 commit comments