Skip to content

Commit

Permalink
Fix GH build action
Browse files Browse the repository at this point in the history
- Bump to node 18/20
- Use better filenames
  • Loading branch information
bookernath committed Oct 19, 2024
1 parent 4d1bab4 commit 2a7b993
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/pull_request_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ on:
jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node: [16.x]
os: [ubuntu-latest]
node: [18.x, 20.x]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
Expand All @@ -28,13 +29,21 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Read package.json
uses: zvonimirsun/read-package-version-actions@v2
id: package-version

- name: Get short SHA
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ matrix.os }}-node-${{ matrix.node }}
- name: Install Stencil CLI Dependency
run: npm install -g @bigcommerce/stencil-cli
Expand All @@ -46,17 +55,19 @@ jobs:
run: npx grunt check

- name: Validate theme successfully bundles
run: npx stencil bundle --name bundle
run: npx stencil bundle --name ${{ matrix.os }}-node-${{ matrix.node }}-v${{ steps.package-version.outputs.version }}-${{ steps.vars.outputs.sha_short }}-bundle

- name: Upload bundled theme
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Bundled Theme
path: bundle.zip
name: Bundled-Theme-${{ matrix.os }}-node-${{ matrix.node }}-v${{ steps.package-version.outputs.version }}-${{ steps.vars.outputs.sha_short }}
path: ${{ matrix.os }}-node-${{ matrix.node }}-v${{ steps.package-version.outputs.version }}-${{ steps.vars.outputs.sha_short }}-bundle.zip

- name: Rename bundle analysis report
run: mv assets/dist/report.html assets/dist/${{ matrix.os }}-node-${{ matrix.node }}-v${{ steps.package-version.outputs.version }}-${{ steps.vars.outputs.sha_short }}-report.html

- name: Upload bundle analysis
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Webpack Analysis
path: assets/dist/report.html

name: Webpack-Analysis-${{ matrix.os }}-node-${{ matrix.node }}-v${{ steps.package-version.outputs.version }}-${{ steps.vars.outputs.sha_short }}
path: assets/dist/${{ matrix.os }}-node-${{ matrix.node }}-v${{ steps.package-version.outputs.version }}-${{ steps.vars.outputs.sha_short }}-report.html
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Draft
- Fix GH build action & added package version and short commit hash to artifact names in GitHub Actions workflow for improved traceability and uniqueness. ([#2494](https://github.com/bigcommerce/cornerstone/pull/2494))

## 6.15.0 (10-18-2024)
- Cornerstone changes to support inc/ex tax price lists on PDP [#2486](https://github.com/bigcommerce/cornerstone/pull/2486)
Expand Down Expand Up @@ -65,7 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 6.12.0 (07-06-2023)
- sync package lock file [#2373](https://github.com/bigcommerce/cornerstone/pull/2373)
- Stored payment method name is not visible in Cornerstone Bold theme style [#2371](https://github.com/bigcommerce/cornerstone/pull/2371)
- (sanitize product.description) in the theme results to error length of description from Google indexing for lengthy product description [#2363](https://github.com/bigcommerce/cornerstone/pull/2363)
- (sanitize product.description) in the theme results to 'error length of description' from Google indexing for lengthy product description [#2363](https://github.com/bigcommerce/cornerstone/pull/2363)
- Added style configs to payment buttons [#2361](https://github.com/bigcommerce/cornerstone/pull/2361)
- Bump Stencil utils to 6.15.1 [#2365][https://github.com/bigcommerce/cornerstone/pull/2365]
- Write a Review on product page shows blank pop up on second click. [#2368][https://github.com/bigcommerce/cornerstone/pull/2368]
Expand Down

0 comments on commit 2a7b993

Please sign in to comment.