✨ Add iwb alias to ImportWorkbook #58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ♻️ ExcelFast CI | |
| on: | |
| push: | |
| branches: '*' | |
| tags: | |
| - 'v[0-9]*.[0-9]*.[0-9]*' | |
| pull_request: | |
| branches: [ main, ci ] | |
| defaults: | |
| run: | |
| shell: pwsh | |
| jobs: | |
| build: | |
| name: 👷 Build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: 🚚 Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Required for GitVersion | |
| - name: ⚡ Cache NuGet packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.nuget/packages | |
| ~/.local/share/powershell/Modules | |
| Artifacts | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: ⚡ Install PowerShell Modules | |
| uses: JustinGrote/ModuleFast-action@v0.0.1 | |
| with: | |
| update: true | |
| - name: 👷 Build | |
| env: | |
| # "Pin" the module version if the workflow is triggered by a tag | |
| MODULEVERSION: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || null }} | |
| run: | | |
| try {./build.ps1} | |
| catch { | |
| "::error file=$PSScriptRoot/build.ps1::Build failed with error: $($_.Exception.Message) `n $(Get-Error | Out-String)" -replace "`n","%0A" | |
| throw | |
| } | |
| - name: 🧪 Test | |
| run: | | |
| $config = New-PesterConfiguration | |
| $config.run.throw = $true | |
| $config.output.Verbosity = 'Detailed' | |
| $config.TestResult.Enabled = $true | |
| $config.TestResult.OutputFormat = 'NUnitXml' | |
| Invoke-Pester -Configuration $config | |
| # - name: 📈 Report Test Results | |
| # uses: dorny/test-reporter@v2 | |
| # with: | |
| # name: Pester Tests | |
| # path: testResults.xml | |
| # reporter: dotnet-nunit | |
| - name: 📤 Upload Module Zip | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ExcelFast | |
| path: ./Artifacts/Module | |
| - name: 📤 Upload Nupkg | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ExcelFast-nupkg | |
| path: ./Artifacts/*.nupkg | |
| archive: false #Get nupkg directly | |
| publish: | |
| name: 🚢 Publish to PowerShell Gallery | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| environment: | |
| name: PowerShell Gallery | |
| url: https://www.powershellgallery.com/packages/ExcelFast | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Download Build Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ExcelFast | |
| path: ./Release | |
| - name: 🚢 Publish to PowerShell Gallery | |
| env: | |
| PSGALLERY_API_KEY: ${{ secrets.PSGALLERY }} | |
| run: | | |
| $DebugPreference = 'Continue' | |
| $VerbosePreference = 'Continue' | |
| # Bugfix for PSResourceRepository not being registered in GitHub Actions environment | |
| Register-PSResourceRepository -PSGallery -Force | |
| Publish-PSResource -Path ./Release -ApiKey $env:PSGALLERY_API_KEY |