Skip to content

Commit 16d215c

Browse files
committed
Show the built version
1 parent 7f12b05 commit 16d215c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,18 @@ jobs:
3838
ruby-version: ${{ matrix.ruby }}
3939
rubygems: ${{ matrix.ruby < '2.7' && '3.4.22' || '' }}
4040
bundler-cache: true
41+
- id: platform
42+
run: |
43+
#!ruby
44+
lib = File.expand_path("lib/#{RUBY_VERSION}/#{Gem::Platform.local}")
45+
libs = [ENV["RUBYLIB"], lib].compact.join(File::PATH_SEPARATOR)
46+
File.write(ENV["GITHUB_ENV"], "RUBYLIB=#{libs}\n", mode: "a")
47+
shell: ruby {0}
48+
- name: Version
49+
run: |
50+
ruby -v -retc -e "puts Etc::VERSION if Etc.const_defined?('VERSION')"
4151
- name: Run test
42-
run: bundle exec rake compile test
52+
run: rake compile test
4353
- id: fetch
4454
run: |
4555
: Fetch deeper for changelogs
@@ -50,9 +60,12 @@ jobs:
5060
set +x
5161
shell: bash
5262
if: ${{ matrix.ruby == needs.ruby-versions.outputs.latest }}
63+
- name: Built Version
64+
run: |
65+
ruby -v -retc -e "puts Etc::VERSION if Etc.const_defined?('VERSION')"
5366
- id: build
5467
run: |
55-
bundle exec rake build
68+
rake build
5669
echo "pkg=${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}" >> $GITHUB_OUTPUT
5770
env:
5871
RUNNING_OS: ${{matrix.os}}

0 commit comments

Comments
 (0)