From e6c5666ae2756386e1ce3cbbe51f9388423f1945 Mon Sep 17 00:00:00 2001 From: Leonardo Trevizo Date: Wed, 15 Oct 2025 22:26:53 -0600 Subject: [PATCH] Open ticket to enhance code -> Workflows * added workflows ci: add GitHub Actions to build on main and publish dist as artifact build: automate Vite build on main merges + nightly prerelease asset --- .github/workflows/build.yml | 24 ++++++++++++++++++++++++ .github/workflows/pre-release.yml | 29 +++++++++++++++++++++++++++++ inventory-manager/.gitignore | 2 +- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/pre-release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f406c6c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: build + +on: + push: + branches: [ main ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: npm run build + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml new file mode 100644 index 0000000..8ecac9f --- /dev/null +++ b/.github/workflows/pre-release.yml @@ -0,0 +1,29 @@ +name: pre-release + +on: + push: + branches: [ stage ] + +permissions: + contents: write + +jobs: + nightly: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: npm run build + - run: zip -r dist-nightly.zip dist + - uses: ncipollo/release-action@v1 + with: + tag: nightly + name: Nightly + prerelease: true + allowUpdates: true + replacesArtifacts: true + artifacts: dist-nightly.zip diff --git a/inventory-manager/.gitignore b/inventory-manager/.gitignore index 2980cc4..ddb8fa8 100644 --- a/inventory-manager/.gitignore +++ b/inventory-manager/.gitignore @@ -17,7 +17,7 @@ package-lock.json .vscode/* !.vscode/extensions.json .idea -.idea/ +.idea/* .DS_Store *.suo *.ntvs*