-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit files during CI workflow if build successful
- Loading branch information
1 parent
e2ec771
commit a7e46bd
Showing
2 changed files
with
41 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
- main | ||
paths: | ||
- 'java/**' | ||
- 'scr/**' | ||
- 'src/**' | ||
- 'action.yml' | ||
- 'package.json' | ||
- 'package-lock.json' | ||
|
@@ -18,35 +18,52 @@ on: | |
- main | ||
paths: | ||
- 'java/**' | ||
- 'scr/**' | ||
- 'src/**' | ||
- 'action.yml' | ||
- 'package.json' | ||
- 'package-lock.json' | ||
- 'webpack.config.js' | ||
- '.github/workflows/buildci.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
- name: Build with Maven | ||
run: mvn -B package --file java/pom.xml | ||
- name: Run tests | ||
run: mvn -B test --file java/pom.xml | ||
# Build with npm | ||
- name: Build with npm | ||
run: npm run buildWebpackU | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: collect action descriptor and npm build | ||
path: | | ||
action.yml | ||
bundle/ | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- name: Build with Maven | ||
run: mvn -B package --file java/pom.xml | ||
|
||
- name: Run tests | ||
run: mvn -B test --file java/pom.xml | ||
|
||
# Build with npm | ||
- name: Build with npm | ||
run: npm run buildWebpackU | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: collect action descriptor and npm build | ||
path: | | ||
action.yml | ||
bundle/ | ||
- name: Configure Git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
- name: Commit and push built files | ||
run: | | ||
git add bundle/ | ||
git commit -m "Automated build update" | ||
git push | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters