diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 798f65a..8ac813e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ env: # vNext releases are prereleases: -preview. PRERELEASE_LABEL: ${{ github.ref == 'refs/heads/vNext' && 'preview' || '' }} # IdentityCommand version installed for tests and packaging; the module copies its private helpers. - IDENTITYCOMMAND_VERSION: '0.7.159' + IDENTITYCOMMAND_VERSION: '1.0.1' defaults: run: @@ -63,6 +63,16 @@ jobs: - uses: actions/checkout@v7 - name: Get Build Scripts run: git clone --depth 1 --branch $env:BUILD_REF https://github.com/pspete/pspete.Build build + # CurrentUser modules are cached; install.ps1 and help.ps1 skip those found. + # The key rolls monthly so newer module versions are picked up. + - name: Cache Month + id: month + run: '"month=$(Get-Date -Format yyyy-MM)" >> $env:GITHUB_OUTPUT' + - name: Cache Modules + uses: actions/cache@v6 + with: + path: ~/Documents/PowerShell/Modules + key: psmodules-test-${{ steps.month.outputs.month }} - name: Install Dependencies run: ./build/install.ps1 - name: Install IdentityCommand @@ -145,15 +155,19 @@ jobs: - name: PowerShell os: windows-latest shell: pwsh + modules: ~/Documents/PowerShell/Modules - name: WindowsPowerShell os: windows-latest shell: powershell + modules: ~/Documents/WindowsPowerShell/Modules - name: Linux os: ubuntu-latest shell: pwsh + modules: ~/.local/share/powershell/Modules #- name: Mac # os: macos-latest # shell: pwsh + # modules: ~/.local/share/powershell/Modules defaults: run: shell: ${{ matrix.shell }} @@ -168,18 +182,16 @@ jobs: with: name: module path: ${{ env.MODULE_NAME }} - # Windows PowerShell 5.1 has no PSResourceGet; install.ps1 skips its ~60s bootstrap when the module is found. - # The key rolls monthly so a newer PSResourceGet is picked up. + # CurrentUser modules are cached per leg; install.ps1 skips those found, including the PSResourceGet bootstrap on 5.1. + # The key rolls monthly so newer module versions are picked up. - name: Cache Month id: month - if: matrix.shell == 'powershell' run: '"month=$(Get-Date -Format yyyy-MM)" >> $env:GITHUB_OUTPUT' - - name: Cache PSResourceGet - if: matrix.shell == 'powershell' + - name: Cache Modules uses: actions/cache@v6 with: - path: ~/Documents/WindowsPowerShell/Modules/Microsoft.PowerShell.PSResourceGet - key: psresourceget-winps-${{ steps.month.outputs.month }} + path: ${{ matrix.modules }} + key: psmodules-${{ matrix.name }}-${{ steps.month.outputs.month }} - name: Install Dependencies run: ./build/install.ps1 - name: Install IdentityCommand diff --git a/CHANGELOG.md b/CHANGELOG.md index 550a97b..918b149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,20 @@ All notable changes to this project will be documented in this file. ## Unreleased -- N/A +### Added + +- Commands find the Secure Infrastructure Access service url from the `IdentityCommand` session on first use, so no connection step is needed after `New-IDSession` or `New-IDPlatformToken`. Commands follow a later `New-IDSession` or `New-IDPlatformToken`, and fail after `Close-IDSession` until you authenticate again. + +### Changed + +- Requires `IdentityCommand` 1.0.1. +- A request refused with 401 because the session token has expired reports `Session expired at