Skip to content

Commit

Permalink
feat: add github generated SDK_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
coroiu committed Oct 23, 2024
1 parent 3c8ddce commit 1436a33
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build-wasm-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ jobs:
- name: Checkout repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Set version (PR)
if: ${{ github.event_name == 'pull_request' }}
run: |
echo REF_NAME="${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
echo SHA="${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
- name: Set env variables (Branch/Tag)
if: ${{ github.event_name == 'push' }}
run: |
echo REF_NAME="${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo SHA="${GITHUB_SHA}" >> $GITHUB_ENV
- name: Set version
run: |
echo SDK_VERSION="${REF_NAME} (${SHA:0:7})" >> $GITHUB_ENV
echo "SDK_VERSION=${SDK_VERSION}"
- name: Setup Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
Expand Down

0 comments on commit 1436a33

Please sign in to comment.