Skip to content

Build OktaPS module

Build OktaPS module #7

Workflow file for this run

name: Build OktaPS module
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'OktaPS/**'
jobs:
build:
name: Build module
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install InvokeBuild module
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module InvokeBuild
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.12.0'
- name: Determine Version
id: gitversion # id to later be referenced
uses: gittools/actions/gitversion/[email protected]
- name: Perform an Invoke-Build from the command line
shell: pwsh
run: Invoke-Build Build -SemVer ${{ steps.gitversion.outputs.MajorMinorPatch }}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: release
path: release
- name: Publish to PSGallery
shell: pwsh
run: Invoke-Build Publish -NugetServer "https://www.powershellgallery.com/api/v2/package/" -NugetApiKey ${{ secrets.PSGALLERY_API }}