Skip to content

Commit bd6c861

Browse files
authored
[skip changelog] Build is now uploaded as artifact when running tests workflow (#877)
* [skip changelog] Build is now uploaded as artifact when running tests workflow * [skip changelog] Added more information to workflow artifacts * [skip changelog] Fix artifacts paths * [skip changelog] Update upload-artifact action version in test workflow * [skip changelog] Test artifacts are now uploaded separately
1 parent a875807 commit bd6c861

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

Diff for: .github/workflows/test.yaml

+86
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,89 @@ jobs:
100100
with:
101101
file: ./coverage_integ.txt
102102
flags: integ
103+
104+
create-test-artifacts:
105+
runs-on: ubuntu-latest
106+
needs: test-matrix
107+
108+
container:
109+
image: arduino/arduino-cli:builder-1
110+
volumes:
111+
# cache go dependencies across pipeline's steps
112+
- ${{ github.workspace }}/go:/go
113+
114+
steps:
115+
- name: checkout
116+
uses: actions/checkout@v1
117+
118+
- name: build
119+
shell: bash
120+
run: |
121+
PACKAGE_NAME_PREFIX="${{ github.workflow }}"
122+
if [ "${{ github.event_name }}" = "pull_request" ]; then
123+
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.event.number }}"
124+
fi
125+
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.sha }}"
126+
export PACKAGE_NAME_PREFIX
127+
goreleaser --snapshot
128+
129+
# Uploads all architectures as separate artifacts
130+
- name: Upload Linux 32 bit artifact
131+
uses: actions/upload-artifact@v2
132+
with:
133+
name: Linux_32bit
134+
path: dist/*Linux_32bit.tar.gz
135+
136+
- name: Upload Linux 64 bit artifact
137+
uses: actions/upload-artifact@v2
138+
with:
139+
name: Linux_64bit
140+
path: dist/*Linux_64bit.tar.gz
141+
142+
- name: Upload Windows 32 bit artifact
143+
uses: actions/upload-artifact@v2
144+
with:
145+
name: Windows_32bit
146+
path: dist/*Windows_32bit.zip
147+
148+
- name: Upload Windows 64 bit artifact
149+
uses: actions/upload-artifact@v2
150+
with:
151+
name: Windows_64bit
152+
path: dist/*Windows_64bit.zip
153+
154+
- name: Upload Linux ARMv6 artifact
155+
uses: actions/upload-artifact@v2
156+
with:
157+
name: Linux_ARMv6
158+
path: dist/*Linux_ARMv6.tar.gz
159+
160+
- name: Upload Linux ARMv7 artifact
161+
uses: actions/upload-artifact@v2
162+
with:
163+
name: Linux_ARMv7
164+
path: dist/*Linux_ARMv7.tar.gz
165+
166+
- name: Upload Linux ARM64 artifact
167+
uses: actions/upload-artifact@v2
168+
with:
169+
name: Linux_ARM64
170+
path: dist/*Linux_ARM64.tar.gz
171+
172+
- name: Upload Linux ARM64 bit artifact
173+
uses: actions/upload-artifact@v2
174+
with:
175+
name: Linux_ARM64
176+
path: dist/*Linux_ARM64.tar.gz
177+
178+
- name: Upload MacOS 64 bit artifact
179+
uses: actions/upload-artifact@v2
180+
with:
181+
name: macOS_64bit
182+
path: dist/*macOS_64bit.tar.gz
183+
184+
- name: Upload checksums
185+
uses: actions/upload-artifact@v2
186+
with:
187+
name: checksums
188+
path: dist/*checksums.txt

0 commit comments

Comments
 (0)