-
Notifications
You must be signed in to change notification settings - Fork 63
94 lines (81 loc) · 3.52 KB
/
build-ios.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
name: Build iOS
on:
pull_request:
branches:
- master
jobs:
release_and_publish:
name: Build iOS pods
runs-on: macos-latest
timeout-minutes: 60
strategy:
matrix:
golang:
- 1.18
steps:
- name: Checkout changes
uses: actions/checkout@v4
- name: Set constants
run: echo "::set-output name=GOMOBILE_IPFS_VERSION::0.42.0-dev-${{ github.sha }}" # yamllint disable-line rule:line-length
id: constants
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.golang }}
- name: Set GOPATH in env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
mkdir -p $(go env GOPATH)/src/github.com/ipfs-shipyard
ln -s $PWD $(go env GOPATH)/src/github.com/ipfs-shipyard/gomobile-ipfs
shell: bash
- name: Set GOPATH in env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
mkdir -p $(go env GOPATH)/src/github.com/ipfs-shipyard
ln -s $PWD $(go env GOPATH)/src/github.com/ipfs-shipyard/gomobile-ipfs
shell: bash
- name: Restore Go mod cache
id: cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('go/go.sum') }}
- name: Install Go mod
if: steps.cache.outputs.cache-hit != 'true'
working-directory: go
run: GO111MODULE=on go mod vendor
- name: Update Cocoapods
run: |
gem update cocoapods cocoapods-trunk
pod setup
- name: Build iOS packages
env:
GOMOBILE_IPFS_VERSION: ${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }} # yamllint disable-line rule:line-length
run: make build_bridge.ios
- name: Upload the core archive
uses: actions/upload-artifact@v3
with:
path: build/ios/cocoapods/core/${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}/Gomobile-IPFS-Core-v${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}.pod.zip # yamllint disable-line rule:line-length
name: Gomobile-IPFS-Core-v${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}.pod.zip # yamllint disable-line rule:line-length
if-no-files-found: error
- name: Upload the core podspec
uses: actions/upload-artifact@v3
with:
path: build/ios/cocoapods/core/${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}/Gomobile-IPFS-Core.podspec # yamllint disable-line rule:line-length
name: Gomobile-IPFS-Core.podspec
if-no-files-found: error
- name: Upload the bridge archive
uses: actions/upload-artifact@v3
with:
path: build/ios/cocoapods/bridge/${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}/Gomobile-IPFS-Bridge-v${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}.pod.zip # yamllint disable-line rule:line-length
name: Gomobile-IPFS-Bridge-v${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}.pod.zip # yamllint disable-line rule:line-length
if-no-files-found: error
- name: Upload the bridge podspec
uses: actions/upload-artifact@v3
with:
path: build/ios/cocoapods/bridge/${{ steps.constants.outputs.GOMOBILE_IPFS_VERSION }}/Gomobile-IPFS-Bridge.podspec # yamllint disable-line rule:line-length
name: Gomobile-IPFS-Bridge.podspec
if-no-files-found: error