9191 name : Build Gem
9292 runs-on : ubuntu-latest
9393 needs : validate
94+ outputs :
95+ artifact_name : ${{ steps.verify-gem.outputs.artifact_name }}
9496
9597 steps :
9698 - name : Checkout code
@@ -117,9 +119,13 @@ jobs:
117119 ls -la *.gem
118120
119121 - name : Install, verify gem contents and specifications
122+ id : verify-gem
120123 run : |
124+ GEM_NAME="twelvedata_ruby-${{ needs.validate.outputs.version }}.gem"
125+ echo "artifact_name=${GEM_NAME}" >> $GITHUB_OUTPUT
126+
121127 echo "Installing gem for verification..."
122- gem install twelvedata_ruby-${{ needs.validate.outputs.version }}.gem
128+ gem install ${GEM_NAME}
123129
124130 echo "🔍 Verifying gem contents..."
125131 gem contents twelvedata_ruby --version ${{ needs.validate.outputs.version }}
@@ -128,16 +134,17 @@ jobs:
128134 gem specification twelvedata_ruby --version ${{ needs.validate.outputs.version }}
129135
130136 - name : Upload gem artifact
137+ id : upload-artifact
131138 uses : actions/upload-artifact@v4
132139 with :
133- name : gem- ${{ needs.validate .outputs.version }}
134- path : " *. gem"
140+ name : ${{ steps.verify-gem .outputs.artifact_name }}
141+ path : ${{ steps.verify- gem.outputs.artifact_name }}
135142 retention-days : 30
136143
137144 security_scan :
138145 name : Security Scan
139146 runs-on : ubuntu-latest
140- needs : [ build, validate]
147+ needs : build
141148
142149 steps :
143150 - name : Checkout code
@@ -152,7 +159,7 @@ jobs:
152159 - name : Download gem artifact
153160 uses : actions/download-artifact@v4
154161 with :
155- name : gem- ${{ needs.validate .outputs.version }}
162+ name : ${{ needs.build .outputs.artifact_name }}
156163
157164 - name : Security audit
158165 run : |
@@ -162,7 +169,7 @@ jobs:
162169
163170 echo "🔍 Checking gem for vulnerabilities..."
164171 # Install the built gem and check its dependencies
165- gem install twelvedata_ruby- ${{ needs.validate .outputs.version }}.gem
172+ gem install ${{ needs.build .outputs.artifact_name }}
166173
167174 echo "✅ Security scan completed"
168175
0 commit comments