diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 71aada3a107..f25443c9c35 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -117,3 +117,89 @@ jobs: token: ${{secrets.CODECOV_TOKEN}} file: ./coverage_integ.txt flags: integ + + create-test-artifacts: + runs-on: ubuntu-latest + needs: test-matrix + + container: + image: arduino/arduino-cli:builder-1 + volumes: + # cache go dependencies across pipeline's steps + - ${{ github.workspace }}/go:/go + + steps: + - name: checkout + uses: actions/checkout@v1 + + - name: build + shell: bash + run: | + PACKAGE_NAME_PREFIX="${{ github.workflow }}" + if [ "${{ github.event_name }}" = "pull_request" ]; then + PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.event.number }}" + fi + PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.sha }}" + export PACKAGE_NAME_PREFIX + goreleaser --snapshot + + # Uploads all architectures as separate artifacts + - name: Upload Linux 32 bit artifact + uses: actions/upload-artifact@v2 + with: + name: Linux_32bit + path: dist/*Linux_32bit.tar.gz + + - name: Upload Linux 64 bit artifact + uses: actions/upload-artifact@v2 + with: + name: Linux_64bit + path: dist/*Linux_64bit.tar.gz + + - name: Upload Windows 32 bit artifact + uses: actions/upload-artifact@v2 + with: + name: Windows_32bit + path: dist/*Windows_32bit.zip + + - name: Upload Windows 64 bit artifact + uses: actions/upload-artifact@v2 + with: + name: Windows_64bit + path: dist/*Windows_64bit.zip + + - name: Upload Linux ARMv6 artifact + uses: actions/upload-artifact@v2 + with: + name: Linux_ARMv6 + path: dist/*Linux_ARMv6.tar.gz + + - name: Upload Linux ARMv7 artifact + uses: actions/upload-artifact@v2 + with: + name: Linux_ARMv7 + path: dist/*Linux_ARMv7.tar.gz + + - name: Upload Linux ARM64 artifact + uses: actions/upload-artifact@v2 + with: + name: Linux_ARM64 + path: dist/*Linux_ARM64.tar.gz + + - name: Upload Linux ARM64 bit artifact + uses: actions/upload-artifact@v2 + with: + name: Linux_ARM64 + path: dist/*Linux_ARM64.tar.gz + + - name: Upload MacOS 64 bit artifact + uses: actions/upload-artifact@v2 + with: + name: macOS_64bit + path: dist/*macOS_64bit.tar.gz + + - name: Upload checksums + uses: actions/upload-artifact@v2 + with: + name: checksums + path: dist/*checksums.txt