-
Notifications
You must be signed in to change notification settings - Fork 183
59 lines (50 loc) · 1.74 KB
/
build_artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: build_artifacts
on:
workflow_dispatch:
inputs:
relay-endpoint:
description: 'The endpoint of the relay e.g. relay.walletconnect.com'
required: false
default: 'relay.walletconnect.com'
project-id:
description: 'WalletConnect project id'
required: true
push:
branches:
- main
jobs:
build:
runs-on: macos-latest-xlarge
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
**/SourcePackagesCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
- name: Build for testing on workflow_dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
shell: bash
run: make build_all RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }}
- name: Build for testing on push
if: ${{ github.event_name == 'push' }}
shell: bash
run: make build_all RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }}
- name: Tar DerivedDataCache
shell: bash
run: test -d "DerivedDataCache" && tar cfPp products.tar --format posix DerivedDataCache/Build
- uses: actions/upload-artifact@v3
with:
name: main-derivedData
path: products.tar
if-no-files-found: error
# Slack notification for failing smoke and relay tests
- name: Slack Notification for Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: CI pipeline for preparing arifacts failed to build main branch or failed to upload artifact. Check the logs for more details.
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}