Skip to content

Commit 9b00661

Browse files
committed
Remove release lane from Fastfile
1 parent 3574637 commit 9b00661

File tree

7 files changed

+7
-652
lines changed

7 files changed

+7
-652
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ jobs:
3434
asset_path: ${{ runner.temp }}/archive.zip
3535
asset_name: rswift-${{ github.event.release.tag_name }}.zip
3636
asset_content_type: application/zip
37+
38+
- name: Store artifact
39+
uses: actions/upload-artifact@v1
40+
with:
41+
name: rswift-${{ github.ref }}
42+
path: .build/release/rswift
43+
3744
- name: Publish to Cocoapods
3845
run: |
3946
export POD_VERSION=$(echo $TAG_NAME | cut -c2-)
4047
pod trunk push
4148
env:
4249
TAG_NAME: ${{ github.event.release.tag_name }}
4350
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
44-
45-
- name: Store artifact
46-
uses: actions/upload-artifact@v1
47-
with:
48-
name: rswift-${{ github.ref }}
49-
path: .build/release/rswift

fastlane/Fastfile

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,5 @@
11
fastlane_version "1.86.0"
22

3-
lane :release do |options|
4-
if options[:skip_git_checks] != true
5-
ensure_git_branch(branch: "master")
6-
ensure_git_status_clean
7-
else
8-
UI.message "Skipping the 'git status clean' and branch check!".yellow
9-
end
10-
11-
git_pull
12-
13-
libraryVersionUsed = read_podspec['dependencies']['R.swift.Library'].first
14-
unless prompt(text: "R.swift.Library #{libraryVersionUsed} is defined as dependency.\nAdjust podspec now if needed. Ready to continue?".green, boolean: true, ci_input: "")
15-
raise "Aborted by user".red
16-
end
17-
18-
currentVersion = version_get_podspec()
19-
UI.message "Current R.swift podspec version is #{currentVersion}"
20-
21-
isPrerelease = false
22-
bumpType = prompt(text: "What kind of release is this? (major/minor/patch/custom)".green, boolean: false, ci_input: "")
23-
case bumpType
24-
when "major", "minor", "patch"
25-
version_bump_podspec(bump_type: bumpType)
26-
when "custom"
27-
newVersion = prompt(text: "What is the new custom version number?".green, boolean: false, ci_input: "")
28-
version_bump_podspec(version_number: newVersion)
29-
30-
isPrerelease = prompt(text: "Is this a prerelease version?".green, boolean: true, ci_input: "")
31-
else
32-
raise "Invalid release type: #{bumpType}".red
33-
end
34-
35-
newVersion = version_get_podspec()
36-
changelog = prompt(text: "Please provide release notes:".green, boolean: false, ci_input: "", multi_line_end_keyword: "FIN")
37-
af_insert_text_into_file(
38-
file_path: "Changelog.md",
39-
text: "## #{newVersion}\n\n#{changelog}\n\n",
40-
insert_at_bottom: false
41-
)
42-
43-
# Sync version.swift with version in podspec
44-
filepath = '../Sources/rswift/Rswift.swift'
45-
newVersion = version_get_podspec()
46-
47-
content = File.read(filepath).sub(/static let version = "(.*)"/, "static let version = \"#{newVersion}\"")
48-
File.open(filepath, 'wb') { |file| file.write(content) }
49-
50-
if options[:skip_tests] != true
51-
runalltests
52-
else
53-
UI.message "Skipping tests!".yellow
54-
end
55-
56-
sh "cd .. && swift build -c release"
57-
58-
zipPath = "/tmp/rswift-#{newVersion}.zip"
59-
sh "rm -f #{zipPath}"
60-
61-
junk_zip(
62-
paths: ["./.build/release/rswift", "./License"],
63-
output_path: zipPath
64-
)
65-
66-
unless prompt(text: "#{newVersion} has been build and prepped for release. If you have any additional changes you would like to make, please do those before continuing. Would you like to commit, tag, push and release #{newVersion} including all uncommitted changes?".green, boolean: true, ci_input:"y")
67-
raise "Aborted by user".red
68-
end
69-
70-
unless `git status --porcelain`.empty?
71-
git_commit(
72-
path: ".",
73-
message: "Preparing for the #{newVersion} release"
74-
)
75-
end
76-
77-
push_to_git_remote
78-
79-
af_create_github_release(
80-
owner: 'mac-cain13',
81-
repository: 'r.swift',
82-
tag_name: "v#{newVersion}",
83-
target_commitish: 'master',
84-
name: "#{newVersion}",
85-
body: "#{changelog}",
86-
prerelease: isPrerelease
87-
)
88-
89-
af_upload_asset_for_github_release(
90-
file_path: zipPath
91-
)
92-
93-
pod_push
94-
end
95-
963
desc "Runs all the tests"
974
lane :runalltests do
985
cocoapods(repo_update: false)
@@ -110,12 +17,3 @@ lane :runalltests do
11017
clean: true
11118
)
11219
end
113-
114-
error do |lane, exception|
115-
unless is_ci
116-
notification(
117-
title: "R.swift #{lane}",
118-
message: "❌ Failed with an exception."
119-
)
120-
end
121-
end

fastlane/actions/af_create_github_release.rb

Lines changed: 0 additions & 157 deletions
This file was deleted.

fastlane/actions/af_insert_text_into_file.rb

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)