Skip to content

Commit 2b79c1d

Browse files
committed
rollback workflows
1 parent 34e0715 commit 2b79c1d

File tree

3 files changed

+1
-177
lines changed

3 files changed

+1
-177
lines changed

.github/workflows/dev_api.yml

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -25,68 +25,14 @@ jobs:
2525
uses: actions/checkout@v4
2626
with:
2727
persist-credentials: false
28-
28+
2929
- name: Setup PowerShell module cache
3030
id: cacher
3131
uses: actions/cache@v3
3232
with:
3333
path: "~/.local/share/powershell/Modules"
3434
key: ${{ runner.os }}-ModuleBuilder
3535

36-
- name: Install ModuleBuilder
37-
if: steps.cacher.outputs.cache-hit != 'true'
38-
shell: pwsh
39-
run: |
40-
Set-PSRepository PSGallery -InstallationPolicy Trusted
41-
Install-Module ModuleBuilder -AllowClobber -Force
42-
43-
- name: Build CIPPCore Module
44-
shell: pwsh
45-
run: |
46-
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CIPPCore"
47-
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
48-
49-
Write-Host "Building module from: $ModulePath"
50-
Write-Host "Output directory: $OutputPath"
51-
52-
# Generate function permissions before replacing the source module
53-
$ToolsPath = Join-Path $env:GITHUB_WORKSPACE "Tools"
54-
$ScriptPath = Join-Path $ToolsPath "Build-FunctionPermissions.ps1"
55-
pwsh -File $ScriptPath -ModulePath $ModulePath
56-
57-
# Build the module using ModuleBuilder
58-
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
59-
60-
# Replace the source module with the built module
61-
Remove-Item -Path $ModulePath -Recurse -Force
62-
Copy-Item -Path (Join-Path $OutputPath "CIPPCore") -Destination $ModulePath -Recurse -Force
63-
64-
Write-Host "Module built and replaced successfully"
65-
66-
# Clean up output directory
67-
Remove-Item -Path $OutputPath -Recurse -Force
68-
69-
- name: Build CippExtensions Module
70-
shell: pwsh
71-
run: |
72-
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CippExtensions"
73-
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
74-
75-
Write-Host "Building module from: $ModulePath"
76-
Write-Host "Output directory: $OutputPath"
77-
78-
# Build the module using ModuleBuilder
79-
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
80-
81-
# Replace the source module with the built module
82-
Remove-Item -Path $ModulePath -Recurse -Force
83-
Copy-Item -Path (Join-Path $OutputPath "CippExtensions") -Destination $ModulePath -Recurse -Force
84-
85-
Write-Host "Module built and replaced successfully"
86-
87-
# Clean up output directory
88-
Remove-Item -Path $OutputPath -Recurse -Force
89-
9036
- name: Login to Azure
9137
uses: azure/login@v2
9238
with:

.github/workflows/publish_release.yml

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -70,68 +70,6 @@ jobs:
7070
env:
7171
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7272

73-
- name: Setup PowerShell module cache
74-
id: cacher
75-
uses: actions/cache@v3
76-
with:
77-
path: "~/.local/share/powershell/Modules"
78-
key: ${{ runner.os }}-ModuleBuilder
79-
80-
- name: Install ModuleBuilder
81-
if: steps.cacher.outputs.cache-hit != 'true'
82-
shell: pwsh
83-
run: |
84-
Set-PSRepository PSGallery -InstallationPolicy Trusted
85-
Install-Module ModuleBuilder -AllowClobber -Force
86-
87-
- name: Build CIPPCore Module
88-
shell: pwsh
89-
run: |
90-
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CIPPCore"
91-
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
92-
93-
Write-Host "Building module from: $ModulePath"
94-
Write-Host "Output directory: $OutputPath"
95-
96-
# Generate function permissions before replacing the source module
97-
$ToolsPath = Join-Path $env:GITHUB_WORKSPACE "Tools"
98-
$ScriptPath = Join-Path $ToolsPath "Build-FunctionPermissions.ps1"
99-
pwsh -File $ScriptPath -ModulePath $ModulePath
100-
101-
# Build the module using ModuleBuilder
102-
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
103-
104-
# Replace the source module with the built module
105-
Remove-Item -Path $ModulePath -Recurse -Force
106-
Copy-Item -Path (Join-Path $OutputPath "CIPPCore") -Destination $ModulePath -Recurse -Force
107-
108-
Write-Host "Module built and replaced successfully"
109-
110-
# Clean up output directory
111-
Remove-Item -Path $OutputPath -Recurse -Force
112-
113-
- name: Build CippExtensions Module
114-
shell: pwsh
115-
run: |
116-
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CippExtensions"
117-
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
118-
119-
Write-Host "Building module from: $ModulePath"
120-
Write-Host "Output directory: $OutputPath"
121-
122-
# Build the module using ModuleBuilder
123-
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
124-
125-
# Replace the source module with the built module
126-
Remove-Item -Path $ModulePath -Recurse -Force
127-
Copy-Item -Path (Join-Path $OutputPath "CippExtensions") -Destination $ModulePath -Recurse -Force
128-
129-
Write-Host "Module built and replaced successfully"
130-
131-
# Clean up output directory
132-
Remove-Item -Path $OutputPath -Recurse -Force
133-
134-
13573
# Create ZIP File in a New Source Directory
13674
- name: Prepare and Zip Release Files
13775
if: env.tag_exists == 'false'

.github/workflows/upload_dev.yml

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -17,66 +17,6 @@ jobs:
1717
uses: actions/checkout@v4
1818
with:
1919
persist-credentials: false
20-
- name: Setup PowerShell module cache
21-
id: cacher
22-
uses: actions/cache@v3
23-
with:
24-
path: "~/.local/share/powershell/Modules"
25-
key: ${{ runner.os }}-ModuleBuilder
26-
27-
- name: Install ModuleBuilder
28-
if: steps.cacher.outputs.cache-hit != 'true'
29-
shell: pwsh
30-
run: |
31-
Set-PSRepository PSGallery -InstallationPolicy Trusted
32-
Install-Module ModuleBuilder -AllowClobber -Force
33-
34-
- name: Build CIPPCore Module
35-
shell: pwsh
36-
run: |
37-
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CIPPCore"
38-
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
39-
40-
Write-Host "Building module from: $ModulePath"
41-
Write-Host "Output directory: $OutputPath"
42-
43-
# Generate function permissions before replacing the source module
44-
$ToolsPath = Join-Path $env:GITHUB_WORKSPACE "Tools"
45-
$ScriptPath = Join-Path $ToolsPath "Build-FunctionPermissions.ps1"
46-
pwsh -File $ScriptPath -ModulePath $ModulePath
47-
48-
# Build the module using ModuleBuilder
49-
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
50-
51-
# Replace the source module with the built module
52-
Remove-Item -Path $ModulePath -Recurse -Force
53-
Copy-Item -Path (Join-Path $OutputPath "CIPPCore") -Destination $ModulePath -Recurse -Force
54-
55-
Write-Host "Module built and replaced successfully"
56-
57-
# Clean up output directory
58-
Remove-Item -Path $OutputPath -Recurse -Force
59-
60-
- name: Build CippExtensions Module
61-
shell: pwsh
62-
run: |
63-
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CippExtensions"
64-
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
65-
66-
Write-Host "Building module from: $ModulePath"
67-
Write-Host "Output directory: $OutputPath"
68-
69-
# Build the module using ModuleBuilder
70-
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
71-
72-
# Replace the source module with the built module
73-
Remove-Item -Path $ModulePath -Recurse -Force
74-
Copy-Item -Path (Join-Path $OutputPath "CippExtensions") -Destination $ModulePath -Recurse -Force
75-
76-
Write-Host "Module built and replaced successfully"
77-
78-
# Clean up output directory
79-
Remove-Item -Path $OutputPath -Recurse -Force
8020

8121
# Create ZIP File in a New Source Directory
8222
- name: Prepare and Zip Release Files

0 commit comments

Comments
 (0)