fastlane-plugin-semantic_release_workflow 1.0.0 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf393edba2d324a1c1dd58ac2fa01edf62d192bb59ea697db0d000a1be96f0a9
|
4
|
+
data.tar.gz: 1feb7253dfdadd69640c8d1c8bd2b8ce858e04b726fec882af81e15bf72c0013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cd7ed6ee2333122e620ab3ba98942aff9d83244c2b71ec140c1dc5486072151ff8a2efc1dbad6a1f458adb7df33694a84d9cb1479153cbb792a76bedbda92e6
|
7
|
+
data.tar.gz: 18abe1d08b3e3c0ded049f11c2a616dbc0683da5bfa164d04e45c3e3845b5847a363242ed82a33dbb75f6ce783e93340e9f0bfc926bd6b705f7e821afac17ccd
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/semantic_release_helper'
|
3
|
+
require 'uri'
|
4
|
+
require 'net/http'
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
module SharedValues
|
9
|
+
end
|
10
|
+
|
11
|
+
class CreateReleaseAction < Action
|
12
|
+
|
13
|
+
def self.run(params)
|
14
|
+
uri = URI("#{params[:endpoint]}/projects/#{params[:project_id]}/releases")
|
15
|
+
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
|
16
|
+
req = Net::HTTP::Post.new(uri)
|
17
|
+
req['Content-Type'] = 'application/json'
|
18
|
+
req['PRIVATE-TOKEN'] = params[:private_token]
|
19
|
+
req.body = {
|
20
|
+
"assets": {},
|
21
|
+
"description": params[:description],
|
22
|
+
"milestones": [],
|
23
|
+
"name": params[:title],
|
24
|
+
"ref": params[:branch_name],
|
25
|
+
"tag_name": params[:tag]
|
26
|
+
}.to_json
|
27
|
+
res = http.request(req)
|
28
|
+
res
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
#####################################################
|
33
|
+
# @!group Documentation
|
34
|
+
#####################################################
|
35
|
+
|
36
|
+
def self.description
|
37
|
+
"Create Gitlab release"
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.details
|
41
|
+
"Create Gitlab release"
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.available_options
|
45
|
+
# Define all options your action supports.
|
46
|
+
|
47
|
+
# Below a few examples
|
48
|
+
[
|
49
|
+
FastlaneCore::ConfigItem.new(
|
50
|
+
key: :description,
|
51
|
+
description: "Release note description",
|
52
|
+
default_value: "",
|
53
|
+
optional: true
|
54
|
+
),
|
55
|
+
FastlaneCore::ConfigItem.new(
|
56
|
+
key: :title,
|
57
|
+
description: "Title for release notes",
|
58
|
+
optional: true
|
59
|
+
),
|
60
|
+
FastlaneCore::ConfigItem.new(
|
61
|
+
key: :endpoint,
|
62
|
+
description: "Gitlab endpoint",
|
63
|
+
optional: false
|
64
|
+
),
|
65
|
+
FastlaneCore::ConfigItem.new(
|
66
|
+
key: :project_id,
|
67
|
+
description: "Gitlab project id",
|
68
|
+
optional: false
|
69
|
+
),
|
70
|
+
FastlaneCore::ConfigItem.new(
|
71
|
+
key: :private_token,
|
72
|
+
description: "Gitlab user private token",
|
73
|
+
optional: false
|
74
|
+
),
|
75
|
+
FastlaneCore::ConfigItem.new(
|
76
|
+
key: :tag,
|
77
|
+
description: "Release tag",
|
78
|
+
optional: true
|
79
|
+
),
|
80
|
+
FastlaneCore::ConfigItem.new(
|
81
|
+
key: :branch_name,
|
82
|
+
description: "Git branch name",
|
83
|
+
optional: false
|
84
|
+
)
|
85
|
+
]
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.output
|
89
|
+
# Define the shared values you are going to provide
|
90
|
+
# Example
|
91
|
+
[]
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.return_value
|
95
|
+
# If your method provides a return value, you can describe here what it does
|
96
|
+
"Returns generated release notes as a string"
|
97
|
+
end
|
98
|
+
|
99
|
+
def self.authors
|
100
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
101
|
+
["xotahal"]
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.is_supported?(platform)
|
105
|
+
# you can do things like
|
106
|
+
true
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -1 +1 @@
|
|
1
|
-
module Fastlane module
|
1
|
+
module Fastlane module SemanticReleaseWorkflow VERSION = "1.0.5" end end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'fastlane/plugin/semantic_release/version'
|
2
2
|
|
3
3
|
module Fastlane
|
4
|
-
module
|
4
|
+
module SemanticReleaseWorkflow
|
5
5
|
# Return all .rb files inside the "actions" and "helper" directory
|
6
6
|
def self.all_classes
|
7
7
|
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
@@ -11,6 +11,6 @@ end
|
|
11
11
|
|
12
12
|
# By default we want to import all available actions and helpers
|
13
13
|
# A plugin can contain any number of actions and plugins
|
14
|
-
Fastlane::
|
14
|
+
Fastlane::SemanticReleaseWorkflow.all_classes.each do |current|
|
15
15
|
require current
|
16
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-semantic_release_workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phong Nguyen
|
@@ -144,11 +144,12 @@ extra_rdoc_files: []
|
|
144
144
|
files:
|
145
145
|
- LICENSE
|
146
146
|
- README.md
|
147
|
-
- lib/fastlane/plugin/semantic_release.rb
|
148
147
|
- lib/fastlane/plugin/semantic_release/actions/analyze_commits.rb
|
149
148
|
- lib/fastlane/plugin/semantic_release/actions/conventional_changelog.rb
|
149
|
+
- lib/fastlane/plugin/semantic_release/actions/create_release.rb
|
150
150
|
- lib/fastlane/plugin/semantic_release/helper/semantic_release_helper.rb
|
151
151
|
- lib/fastlane/plugin/semantic_release/version.rb
|
152
|
+
- lib/fastlane/plugin/semantic_release_workflow.rb
|
152
153
|
homepage: https://github.com/phongnguyen93/fastlane-plugin-semantic_release
|
153
154
|
licenses:
|
154
155
|
- MIT
|