-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.14 KB
/
Copy pathgithub-pipelines.yml
File metadata and controls
45 lines (38 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build and Publish Artifact
# Trigger on push to the main branch
on:
push:
branches:
- main
# Define environment variables
env:
DEFAULT_BRANCH: main
STEP_VERSION_BY: patch # MAJOR | MINOR | PATCH (0.0.0)
BUILD_FOLDER_NAME: BuildOutput
REQUIRED_MODULES_DIRECTORY: RequiredModules
BUILD_ARTIFACT_NAME: PSModule
jobs:
build:
runs-on: ubuntu-latest
name: Build and Publish Artifact
steps:
# Checkout repository
- name: Checkout code
uses: actions/checkout@v3
# Run PowerShell bootstrap, test, and build script
- name: Bootstrap, Test, and Build
run: |
pwsh ./.build.ps1 -RequiredModulesDirectory ${{ env.REQUIRED_MODULES_DIRECTORY }} -Bootstrap
shell: pwsh
# Publish test results
- name: Publish Test Results
uses: actions/upload-artifact@v4
with:
name: TestResults
path: tests/TestResults.Pester.xml
# Publish build artifacts
- name: Publish Build Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_ARTIFACT_NAME }}
path: ${{ env.BUILD_FOLDER_NAME }}