-
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.
Add GH action to build app and create a release (#9)
* Update publish_app.yml Temporarily disable tag filtering * Update publish_app.yml Debug build step * Add missing npm clean install step * Fix eslint warnings in HxtleakEventLog.js so GH action will run * Fix upload artifact step to use path relative to workspace * Add archive creation and tag release * Add zip archive creation to release * Rename release workflow and merge jobs * Fix paths to release artifacts * Set build output and artifact creation to build/app for cleaner deployment path * Update deploy plays to use tagged release of package and install app from release artefacts
- Loading branch information
1 parent
991aef3
commit 825049b
Showing
7 changed files
with
66 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: release_app | ||
run-name: Build static app and publish with a release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
|
||
release: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: control/app | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Use node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Clean install app | ||
run: npm ci | ||
- name: Build app | ||
run: npm run build | ||
- name: Create TGZ archive | ||
run: | | ||
cd build | ||
tar -cvzf app_build.tgz app | ||
- name: Create ZIP archive | ||
run: | | ||
cd build | ||
zip -r app_build.zip app | ||
- name: List built files | ||
run: ls -lR build | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
control/app/build/app_build.tgz | ||
control/app/build/app_build.zip | ||
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
REACT_APP_ENDPOINT_URL= | ||
BUILD_PATH=build/app |
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
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
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
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