fastlane-plugin-semantic_release_workflow 1.0.0 → 1.0.1

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: 36cb5c231daacc42fd1609343b0aa04fd9c1fddbd45e213aa312341d140107ab
4
- data.tar.gz: d039e4542a1eedd3e7219a3a5ec9898ee552bd757085117e23f6d366df85dcdc
3
+ metadata.gz: ddc9878b1feb322e35fa9f85857caad8e7972a84b7a782169620f33cff0f992d
4
+ data.tar.gz: 2db09f2fafa55575434732116251d5f3ad549e89b0f9fcd1b1bb1f17329e7c3d
5
5
  SHA512:
6
- metadata.gz: 5637899f9827e5259f32429e3cd85e4368fe4eec1a363c9b16679e469463c5a656edac86993c07baabe685095c9e18438b4f0e2d38d406ea8e5f410578c63b25
7
- data.tar.gz: 310581a7d7070d645ab7e7205c790f7ce13700fa90a5d46f52bb1eb9df252033d0700a6e5b4daadd89f2be72b6ad69da5f271af4c62916c0a53dea292e264321
6
+ metadata.gz: 5fe15acc31ae9f257a5b1e009c1ff318c4fcbb32dba7a4d0981d191cb24441453c118bc0e1cbaa48414549476c884b0b8f5ffdd58fda1d01b17456e28f50105d
7
+ data.tar.gz: 69b2df5c792325a475b3574278fc01e3aeb522fa194230e2acb08b72a249e0c49e24b537897feae490b31b7caab13f52934a0c374caae97bbc56f543cca9b39a
@@ -0,0 +1,106 @@
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
+ puts(git_branch)
20
+ req.body = {
21
+ "assets": {},
22
+ "description": params[:description],
23
+ "milestones": [],
24
+ "name": params[:title],
25
+ "ref": git_branch,
26
+ "tag_name": params[:tag]
27
+ }.to_json
28
+ res = http.request(req)
29
+ res
30
+ end
31
+ end
32
+
33
+ #####################################################
34
+ # @!group Documentation
35
+ #####################################################
36
+
37
+ def self.description
38
+ "Create Gitlab release"
39
+ end
40
+
41
+ def self.details
42
+ "Create Gitlab release"
43
+ end
44
+
45
+ def self.available_options
46
+ # Define all options your action supports.
47
+
48
+ # Below a few examples
49
+ [
50
+ FastlaneCore::ConfigItem.new(
51
+ key: :description,
52
+ description: "Release note description",
53
+ default_value: "",
54
+ optional: true
55
+ ),
56
+ FastlaneCore::ConfigItem.new(
57
+ key: :title,
58
+ description: "Title for release notes",
59
+ optional: true
60
+ ),
61
+ FastlaneCore::ConfigItem.new(
62
+ key: :endpoint,
63
+ description: "Gitlab endpoint",
64
+ optional: false
65
+ ),
66
+ FastlaneCore::ConfigItem.new(
67
+ key: :project_id,
68
+ description: "Gitlab project id",
69
+ optional: false
70
+ ),
71
+ FastlaneCore::ConfigItem.new(
72
+ key: :private_token,
73
+ description: "Gitlab user private token",
74
+ optional: false
75
+ ),
76
+ FastlaneCore::ConfigItem.new(
77
+ key: :tag,
78
+ description: "Release tag",
79
+ optional: true
80
+ )
81
+ ]
82
+ end
83
+
84
+ def self.output
85
+ # Define the shared values you are going to provide
86
+ # Example
87
+ []
88
+ end
89
+
90
+ def self.return_value
91
+ # If your method provides a return value, you can describe here what it does
92
+ "Returns generated release notes as a string"
93
+ end
94
+
95
+ def self.authors
96
+ # So no one will ever forget your contribution to fastlane :) You are awesome btw!
97
+ ["xotahal"]
98
+ end
99
+
100
+ def self.is_supported?(platform)
101
+ # you can do things like
102
+ true
103
+ end
104
+ end
105
+ end
106
+ end
@@ -1 +1 @@
1
- module Fastlane module SemanticRelease VERSION = "1.0.0" end end
1
+ module Fastlane module SemanticRelease VERSION = "1.0.1" end 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.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phong Nguyen
@@ -147,6 +147,7 @@ files:
147
147
  - lib/fastlane/plugin/semantic_release.rb
148
148
  - lib/fastlane/plugin/semantic_release/actions/analyze_commits.rb
149
149
  - lib/fastlane/plugin/semantic_release/actions/conventional_changelog.rb
150
+ - lib/fastlane/plugin/semantic_release/actions/create_release.rb
150
151
  - lib/fastlane/plugin/semantic_release/helper/semantic_release_helper.rb
151
152
  - lib/fastlane/plugin/semantic_release/version.rb
152
153
  homepage: https://github.com/phongnguyen93/fastlane-plugin-semantic_release