Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
add commit hash output to the release workflow, and enable npm cache
Browse files Browse the repository at this point in the history
  • Loading branch information
yylyyl committed Sep 25, 2023
1 parent be72b23 commit 7de4992
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm install
- name: Build project
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm install
- name: Build project
run: |
SHA=$(git rev-parse HEAD)
export REACT_APP_CONTAINERUP_BUILD=${{ inputs.build_num }}
export REACT_APP_CONTAINERUP_COMMIT=${SHA::7}
COMMIT=$(git rev-parse --short HEAD)
export REACT_APP_CONTAINERUP_BUILD=${BUILD_NUM}
export REACT_APP_CONTAINERUP_COMMIT=${COMMIT}
echo BUILD=${REACT_APP_CONTAINERUP_BUILD}
echo COMMIT=${REACT_APP_CONTAINERUP_COMMIT}
echo "COMMIT=${COMMIT}" >> ${GITHUB_OUTPUT}
npm run build
env:
BUILD_NUM: ${{ inputs.build_num }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 7de4992

Please sign in to comment.