Skip to content

[skip changelog] Build is now uploaded as artifact when running tests workflow #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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