Skip to content

Commit 474e39d

Browse files
committed
chore(ci): add the needed files for enabling ci
1 parent c8148ab commit 474e39d

File tree

8 files changed

+402
-0
lines changed

8 files changed

+402
-0
lines changed

.env.release

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# General
2+
GIT_TOKEN=$GITHUB_TOKEN
3+
REPOSITORY_NAME=Fueled/figma-export
4+
BUILD_CONFIGURATION=Release
5+
SCHEME=figma-export
6+
VERSION_BUMP_TYPE=patch
7+
FORCE_NECESSARY=true
8+
9+
# Linear
10+
FUELED_LINEAR_API_KEY=$FUELED_LINEAR_API_KEY
11+
FUELED_LINEAR_TEAM_ID=
12+
FUELED_LINEAR_LABELS=
13+
FUELED_LINEAR_FROM_STATE=
14+
FUELED_LINEAR_TO_STATE=

Gemfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"
4+
gem 'xcode-install'
5+
6+
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
7+
eval_gemfile(plugins_path) if File.exist?(plugins_path)

Gemfile.lock

+229
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
GIT
2+
remote: https://github.com/Fueled/fastlane-plugin-fueled
3+
revision: 15f74bb16ce0b388f785e36fba53b933d4791588
4+
tag: 0.3.0
5+
specs:
6+
fastlane-plugin-fueled (0.3.0)
7+
fastlane-plugin-appcenter (~> 2.0.0)
8+
fastlane-plugin-versioning (~> 0.5.0)
9+
10+
GEM
11+
remote: https://rubygems.org/
12+
specs:
13+
CFPropertyList (3.0.6)
14+
rexml
15+
addressable (2.8.5)
16+
public_suffix (>= 2.0.2, < 6.0)
17+
artifactory (3.0.15)
18+
atomos (0.1.3)
19+
aws-eventstream (1.3.0)
20+
aws-partitions (1.862.0)
21+
aws-sdk-core (3.190.0)
22+
aws-eventstream (~> 1, >= 1.3.0)
23+
aws-partitions (~> 1, >= 1.651.0)
24+
aws-sigv4 (~> 1.8)
25+
jmespath (~> 1, >= 1.6.1)
26+
aws-sdk-kms (1.74.0)
27+
aws-sdk-core (~> 3, >= 3.188.0)
28+
aws-sigv4 (~> 1.1)
29+
aws-sdk-s3 (1.141.0)
30+
aws-sdk-core (~> 3, >= 3.189.0)
31+
aws-sdk-kms (~> 1)
32+
aws-sigv4 (~> 1.8)
33+
aws-sigv4 (1.8.0)
34+
aws-eventstream (~> 1, >= 1.0.2)
35+
babosa (1.0.4)
36+
claide (1.1.0)
37+
colored (1.2)
38+
colored2 (3.1.2)
39+
commander (4.6.0)
40+
highline (~> 2.0.0)
41+
declarative (0.0.20)
42+
digest-crc (0.6.5)
43+
rake (>= 12.0.0, < 14.0.0)
44+
domain_name (0.6.20231109)
45+
dotenv (2.8.1)
46+
emoji_regex (3.2.3)
47+
excon (0.105.0)
48+
faraday (1.10.3)
49+
faraday-em_http (~> 1.0)
50+
faraday-em_synchrony (~> 1.0)
51+
faraday-excon (~> 1.1)
52+
faraday-httpclient (~> 1.0)
53+
faraday-multipart (~> 1.0)
54+
faraday-net_http (~> 1.0)
55+
faraday-net_http_persistent (~> 1.0)
56+
faraday-patron (~> 1.0)
57+
faraday-rack (~> 1.0)
58+
faraday-retry (~> 1.0)
59+
ruby2_keywords (>= 0.0.4)
60+
faraday-cookie_jar (0.0.7)
61+
faraday (>= 0.8.0)
62+
http-cookie (~> 1.0.0)
63+
faraday-em_http (1.0.0)
64+
faraday-em_synchrony (1.0.0)
65+
faraday-excon (1.1.0)
66+
faraday-httpclient (1.0.1)
67+
faraday-multipart (1.0.4)
68+
multipart-post (~> 2)
69+
faraday-net_http (1.0.1)
70+
faraday-net_http_persistent (1.2.0)
71+
faraday-patron (1.0.0)
72+
faraday-rack (1.0.0)
73+
faraday-retry (1.0.3)
74+
faraday_middleware (1.2.0)
75+
faraday (~> 1.0)
76+
fastimage (2.2.7)
77+
fastlane (2.217.0)
78+
CFPropertyList (>= 2.3, < 4.0.0)
79+
addressable (>= 2.8, < 3.0.0)
80+
artifactory (~> 3.0)
81+
aws-sdk-s3 (~> 1.0)
82+
babosa (>= 1.0.3, < 2.0.0)
83+
bundler (>= 1.12.0, < 3.0.0)
84+
colored
85+
commander (~> 4.6)
86+
dotenv (>= 2.1.1, < 3.0.0)
87+
emoji_regex (>= 0.1, < 4.0)
88+
excon (>= 0.71.0, < 1.0.0)
89+
faraday (~> 1.0)
90+
faraday-cookie_jar (~> 0.0.6)
91+
faraday_middleware (~> 1.0)
92+
fastimage (>= 2.1.0, < 3.0.0)
93+
gh_inspector (>= 1.1.2, < 2.0.0)
94+
google-apis-androidpublisher_v3 (~> 0.3)
95+
google-apis-playcustomapp_v1 (~> 0.1)
96+
google-cloud-storage (~> 1.31)
97+
highline (~> 2.0)
98+
http-cookie (~> 1.0.5)
99+
json (< 3.0.0)
100+
jwt (>= 2.1.0, < 3)
101+
mini_magick (>= 4.9.4, < 5.0.0)
102+
multipart-post (>= 2.0.0, < 3.0.0)
103+
naturally (~> 2.2)
104+
optparse (~> 0.1.1)
105+
plist (>= 3.1.0, < 4.0.0)
106+
rubyzip (>= 2.0.0, < 3.0.0)
107+
security (= 0.1.3)
108+
simctl (~> 1.6.3)
109+
terminal-notifier (>= 2.0.0, < 3.0.0)
110+
terminal-table (~> 3)
111+
tty-screen (>= 0.6.3, < 1.0.0)
112+
tty-spinner (>= 0.8.0, < 1.0.0)
113+
word_wrap (~> 1.0.0)
114+
xcodeproj (>= 1.13.0, < 2.0.0)
115+
xcpretty (~> 0.3.0)
116+
xcpretty-travis-formatter (>= 0.0.3)
117+
fastlane-plugin-appcenter (2.0.0)
118+
fastlane-plugin-versioning (0.5.2)
119+
gh_inspector (1.1.3)
120+
google-apis-androidpublisher_v3 (0.53.0)
121+
google-apis-core (>= 0.11.0, < 2.a)
122+
google-apis-core (0.11.2)
123+
addressable (~> 2.5, >= 2.5.1)
124+
googleauth (>= 0.16.2, < 2.a)
125+
httpclient (>= 2.8.1, < 3.a)
126+
mini_mime (~> 1.0)
127+
representable (~> 3.0)
128+
retriable (>= 2.0, < 4.a)
129+
rexml
130+
webrick
131+
google-apis-iamcredentials_v1 (0.17.0)
132+
google-apis-core (>= 0.11.0, < 2.a)
133+
google-apis-playcustomapp_v1 (0.13.0)
134+
google-apis-core (>= 0.11.0, < 2.a)
135+
google-apis-storage_v1 (0.29.0)
136+
google-apis-core (>= 0.11.0, < 2.a)
137+
google-cloud-core (1.6.0)
138+
google-cloud-env (~> 1.0)
139+
google-cloud-errors (~> 1.0)
140+
google-cloud-env (1.6.0)
141+
faraday (>= 0.17.3, < 3.0)
142+
google-cloud-errors (1.3.1)
143+
google-cloud-storage (1.45.0)
144+
addressable (~> 2.8)
145+
digest-crc (~> 0.4)
146+
google-apis-iamcredentials_v1 (~> 0.1)
147+
google-apis-storage_v1 (~> 0.29.0)
148+
google-cloud-core (~> 1.6)
149+
googleauth (>= 0.16.2, < 2.a)
150+
mini_mime (~> 1.0)
151+
googleauth (1.8.1)
152+
faraday (>= 0.17.3, < 3.a)
153+
jwt (>= 1.4, < 3.0)
154+
multi_json (~> 1.11)
155+
os (>= 0.9, < 2.0)
156+
signet (>= 0.16, < 2.a)
157+
highline (2.0.3)
158+
http-cookie (1.0.5)
159+
domain_name (~> 0.5)
160+
httpclient (2.8.3)
161+
jmespath (1.6.2)
162+
json (2.7.0)
163+
jwt (2.7.1)
164+
mini_magick (4.12.0)
165+
mini_mime (1.1.5)
166+
multi_json (1.15.0)
167+
multipart-post (2.3.0)
168+
nanaimo (0.3.0)
169+
naturally (2.2.1)
170+
optparse (0.1.1)
171+
os (1.1.4)
172+
plist (3.7.0)
173+
public_suffix (5.0.4)
174+
rake (13.1.0)
175+
representable (3.2.0)
176+
declarative (< 0.1.0)
177+
trailblazer-option (>= 0.1.1, < 0.2.0)
178+
uber (< 0.2.0)
179+
retriable (3.1.2)
180+
rexml (3.2.6)
181+
rouge (2.0.7)
182+
ruby2_keywords (0.0.5)
183+
rubyzip (2.3.2)
184+
security (0.1.3)
185+
signet (0.18.0)
186+
addressable (~> 2.8)
187+
faraday (>= 0.17.5, < 3.a)
188+
jwt (>= 1.5, < 3.0)
189+
multi_json (~> 1.10)
190+
simctl (1.6.10)
191+
CFPropertyList
192+
naturally
193+
terminal-notifier (2.0.0)
194+
terminal-table (3.0.2)
195+
unicode-display_width (>= 1.1.1, < 3)
196+
trailblazer-option (0.1.2)
197+
tty-cursor (0.7.1)
198+
tty-screen (0.8.1)
199+
tty-spinner (0.9.3)
200+
tty-cursor (~> 0.7)
201+
uber (0.1.0)
202+
unicode-display_width (2.5.0)
203+
webrick (1.8.1)
204+
word_wrap (1.0.0)
205+
xcode-install (2.8.1)
206+
claide (>= 0.9.1)
207+
fastlane (>= 2.1.0, < 3.0.0)
208+
xcodeproj (1.23.0)
209+
CFPropertyList (>= 2.3.3, < 4.0)
210+
atomos (~> 0.1.3)
211+
claide (>= 1.0.2, < 2.0)
212+
colored2 (~> 3.1)
213+
nanaimo (~> 0.3.0)
214+
rexml (~> 3.2.4)
215+
xcpretty (0.3.0)
216+
rouge (~> 2.0.7)
217+
xcpretty-travis-formatter (1.0.1)
218+
xcpretty (~> 0.2, >= 0.0.7)
219+
220+
PLATFORMS
221+
arm64-darwin-23
222+
223+
DEPENDENCIES
224+
fastlane
225+
fastlane-plugin-fueled!
226+
xcode-install
227+
228+
BUNDLED WITH
229+
2.4.20

codemagic.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
workflows:
2+
pr-check:
3+
name: PR Check
4+
triggering:
5+
events:
6+
- pull_request
7+
cancel_previous_builds: true
8+
when:
9+
condition: not event.pull_request.draft
10+
max_build_duration: 45
11+
environment:
12+
xcode: 15
13+
scripts:
14+
- name: Test
15+
script: swift test
16+
17+
release:
18+
name: Release from the fueled branch
19+
max_build_duration: 45
20+
triggering:
21+
events:
22+
- push
23+
branch_patterns:
24+
- pattern: fueled
25+
cancel_previous_builds: true
26+
environment:
27+
xcode: 15
28+
groups:
29+
- project-secrets
30+
scripts:
31+
- name: Project Setup
32+
script: |
33+
gem install bundler
34+
bundle install
35+
- name: Run Fastlane
36+
script: bundle exec fastlane mac release --env release

fastlane/Fastfile

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import 'helpers.rb'
2+
3+
fastlane_version '2.206.0'
4+
opt_out_usage
5+
6+
platform :mac do
7+
lane :release do
8+
asset_path = File.join(Dir.pwd, "figma-export.zip")
9+
sh("swift build --configuration release")
10+
sh("zip #{asset_path} ../.build/arm64-apple-macosx/release/figma-export")
11+
12+
current_short_version = short_version_from_tag()
13+
puts "current_short_version: #{current_short_version}"
14+
15+
new_short_version = bump_semver(semver: current_short_version, bump_type: ENV["VERSION_BUMP_TYPE"])
16+
puts "new_short_version: #{new_short_version}"
17+
18+
19+
use_git_credential_store
20+
21+
tag_name = "v#{new_short_version}"
22+
UI.message("Tagging #{tag_name}...")
23+
24+
if is_ci
25+
sh("git tag -f \"#{tag_name}\" && git push origin \"refs/tags/#{tag_name}\" --force")
26+
27+
last_commit_message = sh("git log -1 --pretty=%B").strip
28+
29+
set_github_release(
30+
repository_name: ENV["REPOSITORY_NAME"],
31+
api_bearer: ENV["GIT_TOKEN"],
32+
name: tag_name,
33+
tag_name: tag_name,
34+
description: last_commit_message,
35+
upload_assets: [
36+
asset_path
37+
]
38+
)
39+
else
40+
UI.message("Skipping tagging and github release because this is not a CI build")
41+
end
42+
end
43+
end

fastlane/Pluginfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gem 'fastlane-plugin-fueled', git: "https://github.com/Fueled/fastlane-plugin-fueled", tag: '0.3.0'

fastlane/README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
fastlane documentation
2+
----
3+
4+
# Installation
5+
6+
Make sure you have the latest version of the Xcode command line tools installed:
7+
8+
```sh
9+
xcode-select --install
10+
```
11+
12+
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
13+
14+
# Available Actions
15+
16+
## Mac
17+
18+
### mac release
19+
20+
```sh
21+
[bundle exec] fastlane mac release
22+
```
23+
24+
25+
26+
----
27+
28+
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
29+
30+
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
31+
32+
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

0 commit comments

Comments
 (0)