Skip to content

Commit b73eead

Browse files
Created workflows for latest release
Added two new GitHub Actions workflows: build.yml: Triggers on pushes to the main branch to build the project. pre-release.yml: Triggers on pushes to the stage branch for nightly builds and releases. Updated .gitignore to modify the handling of the .idea directory. WHY It Matters Automating the build and pre-release processes enhances CI/CD practices, ensuring that builds are consistently created and artifacts are managed effectively. The changes to .gitignore prevent unnecessary files from being tracked, keeping the repository clean.
2 parents 7522145 + e6c5666 commit b73eead

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
cache: npm
19+
- run: npm ci
20+
- run: npm run build
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: dist
24+
path: dist

.github/workflows/pre-release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: pre-release
2+
3+
on:
4+
push:
5+
branches: [ stage ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
nightly:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
cache: npm
19+
- run: npm ci
20+
- run: npm run build
21+
- run: zip -r dist-nightly.zip dist
22+
- uses: ncipollo/release-action@v1
23+
with:
24+
tag: nightly
25+
name: Nightly
26+
prerelease: true
27+
allowUpdates: true
28+
replacesArtifacts: true
29+
artifacts: dist-nightly.zip

inventory-manager/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package-lock.json
1717
.vscode/*
1818
!.vscode/extensions.json
1919
.idea
20-
.idea/
20+
.idea/*
2121
.DS_Store
2222
*.suo
2323
*.ntvs*

0 commit comments

Comments
 (0)