Skip to content

Commit 7af7984

Browse files
committed
Add build metadata
1 parent 24ba17b commit 7af7984

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/daily-release.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13+
env:
14+
NODE_ENV: production
1315

1416
steps:
1517
- name: Checking out for ${{ github.ref }}
@@ -75,3 +77,18 @@ jobs:
7577
# run: |
7678
# sleep 15
7779
# curl -s ${{ steps.deploy.outputs.webapp-url }}
80+
81+
- id: compute-hash
82+
name: Compute build metadata
83+
run: |
84+
echo "::set-output name=sha384-es5::`cat packages/bundle/dist/webchat-es5.js | openssl dgst -sha384 -binary | openssl base64 -A`"
85+
echo "::set-output name=sha384-full::`cat packages/bundle/dist/webchat.js | openssl dgst -sha384 -binary | openssl base64 -A`"
86+
echo "::set-output name=sha384-minimal::`cat packages/bundle/dist/webchat-minimal.js | openssl dgst -sha384 -binary | openssl base64 -A`"
87+
echo "::set-output name=package-version::`tar -xOzf packages/bundle/webchat-*.tgz package/package.json | jq -r '.version'`"
88+
89+
- name: Display build metadata
90+
run: |
91+
echo sha384-es5=${{ steps.compute-hash.outputs.sha384-es5 }}
92+
echo sha384-full=${{ steps.compute-hash.outputs.sha384-full }}
93+
echo sha384-minimal=${{ steps.compute-hash.outputs.sha384-minimal }}
94+
echo package-version=${{ steps.compute-hash.outputs.package-version }}

0 commit comments

Comments
 (0)