Skip to content

Commit

Permalink
Add build metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Feb 17, 2021
1 parent 24ba17b commit 7af7984
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/daily-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_ENV: production

steps:
- name: Checking out for ${{ github.ref }}
Expand Down Expand Up @@ -75,3 +77,18 @@ jobs:
# run: |
# sleep 15
# curl -s ${{ steps.deploy.outputs.webapp-url }}

- id: compute-hash
name: Compute build metadata
run: |
echo "::set-output name=sha384-es5::`cat packages/bundle/dist/webchat-es5.js | openssl dgst -sha384 -binary | openssl base64 -A`"
echo "::set-output name=sha384-full::`cat packages/bundle/dist/webchat.js | openssl dgst -sha384 -binary | openssl base64 -A`"
echo "::set-output name=sha384-minimal::`cat packages/bundle/dist/webchat-minimal.js | openssl dgst -sha384 -binary | openssl base64 -A`"
echo "::set-output name=package-version::`tar -xOzf packages/bundle/webchat-*.tgz package/package.json | jq -r '.version'`"
- name: Display build metadata
run: |
echo sha384-es5=${{ steps.compute-hash.outputs.sha384-es5 }}
echo sha384-full=${{ steps.compute-hash.outputs.sha384-full }}
echo sha384-minimal=${{ steps.compute-hash.outputs.sha384-minimal }}
echo package-version=${{ steps.compute-hash.outputs.package-version }}

0 comments on commit 7af7984

Please sign in to comment.