Merge pull request #1217 from WalletConnect/develop #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
group: apple-silicon | |
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 }} |