Skip to content

Commit 160fb61

Browse files
updating pipelines (#72)
* Remove permissions from deploy preview workflow for Pester Help Tests This change simplifies the workflow by removing unnecessary permissions that are not required for the deployment process. Additionally, it corrects the GitHub token secret reference to ensure proper access during the publish step. Thank you! * Update comment for ScriptsToProcess section Clarify the comment for the ScriptsToProcess section in the module manifest. This change enhances readability and understanding of the purpose of this section for future developers. Thank you! * Remove Create_Release_Git_Tag from publish workflow for Pester Help Tests This change simplifies the publish workflow by removing the Create_Release_Git_Tag step. This adjustment helps streamline the process and ensures that the workflow runs more efficiently. Thank you! * Update comment for ScriptsToProcess section for Pester Help Tests Clarify the purpose of the ScriptsToProcess section in the module manifest. This change enhances readability and understanding for future developers. Thank you! * Update comment for ScriptsToProcess section for Pester Help Tests Clarify the purpose of the ScriptsToProcess section in the module manifest. This change enhances readability and understanding for future contributors. Thank you! * Comment out Create_Changelog_Branch for Pester Help Tests This change comments out the Create_Changelog_Branch step in the build workflow. This adjustment is made to streamline the process and avoid unnecessary steps during the build for Pester Help Tests. Thank you! * Add permissions for workflows and update changelog step for Pester Help Tests This commit introduces additional permissions required for the workflows to function correctly, including the ability to create issues and statuses. It also updates the build configuration to ensure the changelog branch is created as part of the process. Thank you! * Update deploy condition to trigger on main branch for Pester Help Tests This change modifies the deployment condition to ensure that the workflow triggers on pushes to the main branch instead of the develop branch. This adjustment aligns the deployment process with the intended branch strategy for Pester Help Tests. Thank you!
1 parent 8987eac commit 160fb61

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/deploy-module.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ env:
1717
buildFolderName: output
1818
buildArtifactName: output
1919

20+
permissions:
21+
contents: write # to create a release
22+
id-token: write # to use the GitHub OIDC token for authentication
23+
packages: write # to publish the module to the PowerShell Gallery
24+
pull-requests: write # to create a pull request for the changelog
25+
issues: write # to create an issue for the changelog
26+
actions: write # to allow the workflow to run actions
27+
checks: write # to allow the workflow to create checks
28+
statuses: write # to allow the workflow to create statuses
29+
2030

2131
name: Deploy Module
2232
# This workflow is triggered on push to the main branch and deploys the module to the PowerShell Gallery and creates a GitHub Release.
@@ -42,7 +52,7 @@ jobs:
4252
shell: pwsh
4353
run: ./build.ps1 -ResolveDependency -tasks pack
4454
env:
45-
ModuleVersion: ${{ env.gitVersion.MajorMinorPatch }}
55+
ModuleVersion: ${{ env.GITVERSION_MAJORMINORPATCH }}
4656
- name: Publish Build Artifact
4757
uses: actions/upload-artifact@v4
4858
with:
@@ -54,7 +64,7 @@ jobs:
5464
runs-on: ubuntu-latest
5565
needs:
5666
- Build_Stage_Package_Module
57-
if: ${{ success() && (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) }}
67+
if: ${{ success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
5868
steps:
5969
- name: Checkout Code
6070
uses: actions/checkout@v3

.github/workflows/deploy-preview-module.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ env:
1919
testResultFolderName: testResults
2020

2121
name: Deploy Preview Module
22+
permissions:
23+
contents: write # to create a release
24+
id-token: write # to use the GitHub OIDC token for authentication
25+
packages: write # to publish the module to the PowerShell Gallery
26+
pull-requests: write # to create a pull request for the changelog
27+
issues: write # to create an issue for the changelog
28+
actions: write # to allow the workflow to run actions
29+
checks: write # to allow the workflow to create checks
30+
statuses: write # to allow the workflow to create statuses
2231

2332
# This workflow is triggered on push to the develop branch and deploys the module to the PowerShell Gallery as a preview version.
2433
jobs:
@@ -71,6 +80,7 @@ jobs:
7180
shell: pwsh
7281
run: ./build.ps1 -tasks publish
7382
env:
83+
GitHubToken: ${{ secrets.GITHUBTOKEN }}
7484
GitHubToken: ${{ secrets.GITHUBTOKEN }}
7585
GalleryApiToken: ${{ secrets.GalleryApiToken }}
7686
ReleaseBranch: develop

source/FabricTools.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ RequiredModules = @(
7070
# Type files (.ps1xml) to be loaded when importing this module
7171
# TypesToProcess = @()
7272

73-
# Format files (.ps1xml) to be loaded when importing this module
73+
# Format files (.ps1xml) to be loaded when importing this module.
7474
# FormatsToProcess = @()
7575

7676
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess

0 commit comments

Comments
 (0)