-
Notifications
You must be signed in to change notification settings - Fork 203
141 lines (133 loc) · 4.37 KB
/
publish.yml
File metadata and controls
141 lines (133 loc) · 4.37 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Publish
on:
workflow_dispatch:
secrets:
GH_TOKEN:
required: true
NPM_TOKEN:
required: true
jobs:
fast-checks:
name: Build + Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
project-path: shells/devbox-fast.json
enable-cache: 'false'
- name: build
run: devbox run --config=shells/devbox-fast.json build
e2e-ios:
name: E2E iOS (min/max)
runs-on: macos-26
env:
YARN_ENABLE_HARDENED_MODE: 0
XCODE_VERSION: '26.2'
ANDROID_SKIP_DOWNLOADS: 1
strategy:
matrix:
include:
- name: ios-min
- name: ios-latest
steps:
- uses: actions/checkout@v4
- name: Aggressive disk cleanup (macOS)
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /Applications/Android\ Studio.app
sudo rm -rf /usr/local/share/miniconda
sudo rm -rf /opt/homebrew
sudo rm -rf "$HOME/Library/Android"
sudo rm -rf "$HOME/.gradle"
sudo rm -rf "$HOME/Library/Developer/CoreSimulator/Devices"
sudo rm -rf "$HOME/Library/Developer/Xcode/DerivedData"
df -H
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.2'
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'false'
- name: Resolve iOS targets
run: |
target=${{ matrix.name == 'ios-min' && 'min' || 'max' }}
device_json="devbox.d/segment-integrations.devbox-plugins.ios/devices/${target}.json"
echo "DETOX_IOS_DEVICE=$(jq -r '.name' "$device_json")" >> "$GITHUB_ENV"
- name: iOS E2E Tests
run: devbox run test-ios
e2e-android:
name: E2E Android (min/max)
runs-on: ubuntu-24.04-arm
env:
EMU_HEADLESS: 1
IOS_SKIP_SETUP: 1
strategy:
matrix:
include:
- name: android-min
target: min
- name: android-latest
target: max
steps:
- uses: actions/checkout@v4
- name: Aggressive disk cleanup (Ubuntu)
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/edge_driver
sudo rm -rf /usr/local/share/gecko_driver
sudo rm -rf /usr/local/share/phantomjs
sudo rm -rf "$HOME/.cache"
df -H
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
enable-cache: 'false'
- name: Resolve Android targets
run: |
device_json="devbox.d/segment-integrations.devbox-plugins.android/devices/${{ matrix.target }}.json"
avd_name=$(jq -r '.name' "$device_json")
echo "DETOX_AVD=${avd_name}" >> "$GITHUB_ENV"
- name: Android E2E Tests
run: devbox run test-android
publish:
name: Publish to npm
environment: Publish
needs: [fast-checks, e2e-ios, e2e-android]
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: devbox installer
uses: jetify-com/devbox-install-action@v0.14.0
with:
project-path: shells/devbox-fast.json
enable-cache: 'false'
- name: Config, Build, Release
run: devbox run --config=shells/devbox-fast.json release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Update Apps
run: |
devbox run update-apps