Skip to content

Commit a36a954

Browse files
authored
set git version tag on successful master merge CI pass (#8)
1 parent 86461d7 commit a36a954

4 files changed

Lines changed: 30 additions & 177 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
ci:
2222
runs-on: ubuntu-latest
2323
name: Tests & Linting
24+
permissions:
25+
contents: write
2426

2527
# limit workflow to run only on main repo and not to consume other workflow run quota
2628
# but allow manual trigger on forked repos
@@ -52,4 +54,25 @@ jobs:
5254
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
5355

5456
- name: Run Minitest Tests
55-
run: bundle exec rails test "test/**/*_test.rb" -e ci
57+
run: bundle exec ruby -Ilib -Itest test/*_test.rb
58+
59+
- name: Create tag
60+
if: >
61+
success() &&
62+
github.event_name == 'push' &&
63+
github.ref == 'refs/heads/master' &&
64+
github.repository == 'boldtrail/component-framework'
65+
run: |
66+
TAG=v$(ruby -I lib -r component/framework/version -e 'puts Component::Framework::VERSION')
67+
68+
git fetch --tags --force
69+
70+
if git rev-parse "$TAG" >/dev/null 2>&1; then
71+
echo "Tag $TAG already exists. Skipping."
72+
echo "created=false" >> "$GITHUB_OUTPUT"
73+
exit 0
74+
fi
75+
76+
git tag "$TAG"
77+
git push origin "$TAG"
78+
echo "created=true" >> "$GITHUB_OUTPUT"

Gemfile.lock

Lines changed: 3 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,11 @@
11
PATH
22
remote: .
33
specs:
4-
component-framework (1.0.2)
4+
component-framework (1.0.3)
55

66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
action_text-trix (2.1.15)
10-
railties
11-
actioncable (8.1.1)
12-
actionpack (= 8.1.1)
13-
activesupport (= 8.1.1)
14-
nio4r (~> 2.0)
15-
websocket-driver (>= 0.6.1)
16-
zeitwerk (~> 2.6)
17-
actionmailbox (8.1.1)
18-
actionpack (= 8.1.1)
19-
activejob (= 8.1.1)
20-
activerecord (= 8.1.1)
21-
activestorage (= 8.1.1)
22-
activesupport (= 8.1.1)
23-
mail (>= 2.8.0)
24-
actionmailer (8.1.1)
25-
actionpack (= 8.1.1)
26-
actionview (= 8.1.1)
27-
activejob (= 8.1.1)
28-
activesupport (= 8.1.1)
29-
mail (>= 2.8.0)
30-
rails-dom-testing (~> 2.2)
31-
actionpack (8.1.1)
32-
actionview (= 8.1.1)
33-
activesupport (= 8.1.1)
34-
nokogiri (>= 1.8.5)
35-
rack (>= 2.2.4)
36-
rack-session (>= 1.0.1)
37-
rack-test (>= 0.6.3)
38-
rails-dom-testing (~> 2.2)
39-
rails-html-sanitizer (~> 1.6)
40-
useragent (~> 0.16)
41-
actiontext (8.1.1)
42-
action_text-trix (~> 2.1.15)
43-
actionpack (= 8.1.1)
44-
activerecord (= 8.1.1)
45-
activestorage (= 8.1.1)
46-
activesupport (= 8.1.1)
47-
globalid (>= 0.6.0)
48-
nokogiri (>= 1.8.5)
49-
actionview (8.1.1)
50-
activesupport (= 8.1.1)
51-
builder (~> 3.1)
52-
erubi (~> 1.11)
53-
rails-dom-testing (~> 2.2)
54-
rails-html-sanitizer (~> 1.6)
55-
activejob (8.1.1)
56-
activesupport (= 8.1.1)
57-
globalid (>= 0.3.6)
58-
activemodel (8.1.1)
59-
activesupport (= 8.1.1)
60-
activerecord (8.1.1)
61-
activemodel (= 8.1.1)
62-
activesupport (= 8.1.1)
63-
timeout (>= 0.4.0)
64-
activestorage (8.1.1)
65-
actionpack (= 8.1.1)
66-
activejob (= 8.1.1)
67-
activerecord (= 8.1.1)
68-
activesupport (= 8.1.1)
69-
marcel (~> 1.0)
709
activesupport (8.1.1)
7110
base64
7211
bigdecimal
@@ -82,129 +21,18 @@ GEM
8221
uri (>= 0.13.1)
8322
base64 (0.3.0)
8423
bigdecimal (3.3.1)
85-
builder (3.3.0)
8624
concurrent-ruby (1.3.5)
8725
connection_pool (2.5.4)
88-
crass (1.0.6)
89-
date (3.5.0)
9026
drb (2.2.3)
91-
erb (5.1.3)
92-
erubi (1.13.1)
93-
globalid (1.3.0)
94-
activesupport (>= 6.1)
9527
i18n (1.14.7)
9628
concurrent-ruby (~> 1.0)
97-
io-console (0.8.1)
98-
irb (1.15.3)
99-
pp (>= 0.6.0)
100-
rdoc (>= 4.0.0)
101-
reline (>= 0.4.2)
10229
json (2.15.2)
10330
logger (1.7.0)
104-
loofah (2.24.1)
105-
crass (~> 1.0.2)
106-
nokogiri (>= 1.12.0)
107-
mail (2.9.0)
108-
logger
109-
mini_mime (>= 0.1.1)
110-
net-imap
111-
net-pop
112-
net-smtp
113-
marcel (1.1.0)
114-
mini_mime (1.1.5)
11531
minitest (5.26.0)
116-
net-imap (0.5.12)
117-
date
118-
net-protocol
119-
net-pop (0.1.2)
120-
net-protocol
121-
net-protocol (0.2.2)
122-
timeout
123-
net-smtp (0.5.1)
124-
net-protocol
125-
nio4r (2.7.5)
126-
nokogiri (1.18.10-aarch64-linux-gnu)
127-
racc (~> 1.4)
128-
nokogiri (1.18.10-aarch64-linux-musl)
129-
racc (~> 1.4)
130-
nokogiri (1.18.10-arm-linux-gnu)
131-
racc (~> 1.4)
132-
nokogiri (1.18.10-arm-linux-musl)
133-
racc (~> 1.4)
134-
nokogiri (1.18.10-arm64-darwin)
135-
racc (~> 1.4)
136-
nokogiri (1.18.10-x86_64-darwin)
137-
racc (~> 1.4)
138-
nokogiri (1.18.10-x86_64-linux-gnu)
139-
racc (~> 1.4)
140-
nokogiri (1.18.10-x86_64-linux-musl)
141-
racc (~> 1.4)
142-
pp (0.6.3)
143-
prettyprint
144-
prettyprint (0.2.0)
145-
psych (5.2.6)
146-
date
147-
stringio
148-
racc (1.8.1)
149-
rack (3.2.4)
150-
rack-session (2.1.1)
151-
base64 (>= 0.1.0)
152-
rack (>= 3.0.0)
153-
rack-test (2.2.0)
154-
rack (>= 1.3)
155-
rackup (2.2.1)
156-
rack (>= 3)
157-
rails (8.1.1)
158-
actioncable (= 8.1.1)
159-
actionmailbox (= 8.1.1)
160-
actionmailer (= 8.1.1)
161-
actionpack (= 8.1.1)
162-
actiontext (= 8.1.1)
163-
actionview (= 8.1.1)
164-
activejob (= 8.1.1)
165-
activemodel (= 8.1.1)
166-
activerecord (= 8.1.1)
167-
activestorage (= 8.1.1)
168-
activesupport (= 8.1.1)
169-
bundler (>= 1.15.0)
170-
railties (= 8.1.1)
171-
rails-dom-testing (2.3.0)
172-
activesupport (>= 5.0.0)
173-
minitest
174-
nokogiri (>= 1.6)
175-
rails-html-sanitizer (1.6.2)
176-
loofah (~> 2.21)
177-
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
178-
railties (8.1.1)
179-
actionpack (= 8.1.1)
180-
activesupport (= 8.1.1)
181-
irb (~> 1.13)
182-
rackup (>= 1.0.0)
183-
rake (>= 12.2)
184-
thor (~> 1.0, >= 1.2.2)
185-
tsort (>= 0.2)
186-
zeitwerk (~> 2.6)
187-
rake (13.3.1)
188-
rdoc (6.15.1)
189-
erb
190-
psych (>= 4.0.0)
191-
tsort
192-
reline (0.6.2)
193-
io-console (~> 0.5)
19432
securerandom (0.4.1)
195-
stringio (3.1.7)
196-
thor (1.4.0)
197-
timeout (0.4.4)
198-
tsort (0.2.0)
19933
tzinfo (2.0.6)
20034
concurrent-ruby (~> 1.0)
20135
uri (1.1.1)
202-
useragent (0.16.11)
203-
websocket-driver (0.8.0)
204-
base64
205-
websocket-extensions (>= 0.1.0)
206-
websocket-extensions (0.1.5)
207-
zeitwerk (2.7.3)
20836

20937
PLATFORMS
21038
aarch64-linux-gnu
@@ -217,8 +45,9 @@ PLATFORMS
21745
x86_64-linux-musl
21846

21947
DEPENDENCIES
48+
activesupport (~> 8.0)
22049
component-framework!
221-
rails (~> 8.0)
50+
minitest (~> 5.26)
22251

22352
BUNDLED WITH
22453
2.6.6

component-framework.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ Gem::Specification.new do |spec|
1515

1616
spec.files = Dir["README.md", "lib/**/*.rb", "LICENSE.txt"]
1717

18-
spec.add_development_dependency "rails", "~> 8.0"
18+
spec.add_development_dependency "activesupport", "~> 8.0"
19+
spec.add_development_dependency "minitest", "~> 5.26"
1920
end

lib/component/framework/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Component
22
module Framework
3-
VERSION = "1.0.2"
3+
VERSION = "1.0.3"
44
end
55
end

0 commit comments

Comments
 (0)