Skip to content

Commit 10c74d2

Browse files
🚀 [Feature]: Unified publish (#47)
## Description - Make the publishing steps unified, so they wait for docs and code to be ready. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [x] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 759849d commit 10c74d2

File tree

1 file changed

+34
-31
lines changed

1 file changed

+34
-31
lines changed

.github/workflows/workflow.yml

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -456,36 +456,6 @@ jobs:
456456
VALIDATE_YAML_PRETTIER: false
457457
VALIDATE_GITLEAKS: false
458458

459-
PublishModule:
460-
name: Publish module
461-
if: ${{ needs.TestModuleStatus.result == 'success' && !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.merged == true}}
462-
needs:
463-
- TestModuleStatus
464-
runs-on: ubuntu-latest
465-
steps:
466-
- name: Checkout Code
467-
uses: actions/checkout@v4
468-
469-
- name: Initialize environment
470-
uses: PSModule/Initialize-PSModule@v1
471-
with:
472-
Version: ${{ inputs.Version }}
473-
Prerelease: ${{ inputs.Prerelease }}
474-
475-
- name: Download module artifact
476-
uses: actions/download-artifact@v4
477-
with:
478-
name: module
479-
path: ${{ inputs.ModulesOutputPath }}
480-
481-
- name: Publish module
482-
uses: PSModule/Publish-PSModule@v1
483-
with:
484-
Name: ${{ inputs.Name }}
485-
ModulePath: ${{ inputs.ModulesOutputPath }}
486-
APIKey: ${{ secrets.APIKEY }}
487-
WhatIf: ${{ inputs.TestProcess }}
488-
489459
BuildSite:
490460
name: Build Site
491461
if: ${{ inputs.PublishDocs && needs.LintDocs.result == 'success' && !cancelled() }}
@@ -607,10 +577,43 @@ jobs:
607577
608578
- uses: actions/upload-pages-artifact@v3
609579

580+
PublishModule:
581+
name: Publish module
582+
if: ${{ needs.TestModuleStatus.result == 'success' && !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.merged == true}}
583+
needs:
584+
- TestModuleStatus
585+
- BuildSite
586+
runs-on: ubuntu-latest
587+
steps:
588+
- name: Checkout Code
589+
uses: actions/checkout@v4
590+
591+
- name: Initialize environment
592+
uses: PSModule/Initialize-PSModule@v1
593+
with:
594+
Version: ${{ inputs.Version }}
595+
Prerelease: ${{ inputs.Prerelease }}
596+
597+
- name: Download module artifact
598+
uses: actions/download-artifact@v4
599+
with:
600+
name: module
601+
path: ${{ inputs.ModulesOutputPath }}
602+
603+
- name: Publish module
604+
uses: PSModule/Publish-PSModule@v1
605+
with:
606+
Name: ${{ inputs.Name }}
607+
ModulePath: ${{ inputs.ModulesOutputPath }}
608+
APIKey: ${{ secrets.APIKEY }}
609+
WhatIf: ${{ inputs.TestProcess }}
610+
610611
PublishSite:
611612
name: Publish documentation
612613
if: ${{ inputs.PublishDocs && needs.BuildSite.result == 'success' && !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.merged == true }}
613-
needs: BuildSite
614+
needs:
615+
- TestModuleStatus
616+
- BuildSite
614617
permissions:
615618
pages: write # to deploy to Pages
616619
id-token: write # to verify the deployment originates from an appropriate source

0 commit comments

Comments
 (0)