Skip to content

Commit

Permalink
Working on CI/CD process
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljolley committed Feb 5, 2024
1 parent 8f12055 commit 06835f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# needs: test
runs-on: ubuntu-latest
env:
PS_GALLERY_API_KEY: ${{ secrets.PS_GALLERY_API_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build & publish module
shell: pwsh
run: ./_build/build.ps1

- name: Deploy to PS Gallery
uses: natescherer/publish-powershell-action@v1
with:
token: ${{ secrets.PS_GALLERY_API_KEY }}
target: gallery
path: dist


- name: Build & publish module
shell: pwsh
run: Publish-Module -Path /dist -NuGetApiKey $env:PS_GALLERY_API_KEY

3 changes: 2 additions & 1 deletion _build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ if (Test-Path $dst) { Remove-Item -Path $dst -Recurse -Force }
Get-ChildItem -Path $src -Exclude *.Tests.ps1 -Recurse | Where-Object FullName -NotLike "*mocks*" | ForEach-Object {
$destination = $_.FullName -replace "\\src", "\dist"
Copy-Item -Path $_.FullName -Destination $destination -Force
}
}
Write-Line "Build complete."

0 comments on commit 06835f7

Please sign in to comment.