Skip to content

Commit

Permalink
added github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Yng808 committed Jan 25, 2024
1 parent 419d139 commit b6222e4
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build & Package

on:
project:
types: [closed]
pull_request:
types: [closed]
release:
types: [published]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Libraries
run: |
npm install
cd spfx
npm install
cd ..
- name: Build
run: |
npm run all
- name: Artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: |
sharepoint/solution/better-hero.sppkg
2 changes: 1 addition & 1 deletion config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "better-hero-client-side-solution",
"id": "77645465-e030-47de-99c9-07f4f53f3b68",
"version": "1.0.0.0",
"version": "0.0.0.1",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
"test": "gulp test",
"package": "gulp clean && gulp build --ship && gulp bundle --ship && gulp package-solution --ship"

},
"dependencies": {
"@microsoft/sp-component-base": "1.18.2",
Expand Down

0 comments on commit b6222e4

Please sign in to comment.