Skip to content

Commit

Permalink
(test): run workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasperson-jc committed Sep 6, 2024
1 parent 535abf5 commit f6220ee
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 78 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/powershell-module-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
name: PowerShell Module CI

on:
pull_request:
# Sequence of patterns matched against refs/heads
push:
branches:
- "master"
paths:
- "PowerShell/Deploy/**"
- "PowerShell/JumpCloud Module/**"
- "PowerShell/ModuleChangelog.md"
types: [opened, synchronize, reopened, labeled, unlabeled]
- RKT-2364-use-upload-secure-artifact

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down
68 changes: 31 additions & 37 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
name: Release and Publish PSModule
on:
pull_request:
types:
- closed
paths:
- "PowerShell/Deploy/**"
- "PowerShell/JumpCloud Module/**"
- "PowerShell/ModuleChangelog.md"
push:
branches:
- master
- RKT-2364-use-upload-secure-artifact

jobs:
Check-If-Merged:
Expand Down Expand Up @@ -132,22 +126,22 @@ jobs:
- name: Manual Approval for Release
run: echo "Awaiting approval from required reviewers before continuing"

Draft-GH-Release:
needs: [Manual-Approval-Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Draft Release
run: |
VERSION=$(grep -Po '(\d+\.\d+\.\d+)' ${{ github.workspace }}/PowerShell/JumpCloud\ Module/JumpCloud.psd1)
TITLE="JumpCloud PowerShell Module v$VERSION"
CHANGELOG=$(cat ${{ github.workspace }}/PowerShell/ModuleChangelog.md |awk "/^## $VERSION/{ f = 1; next } /## [0-9]+.[0-9]+.[0-9]+/{ f = 0 } f")
TAG="v$VERSION"
BODY="$TITLE $CHANGELOG"
# Draft-GH-Release:
# needs: [Manual-Approval-Release]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build Draft Release
# run: |
# VERSION=$(grep -Po '(\d+\.\d+\.\d+)' ${{ github.workspace }}/PowerShell/JumpCloud\ Module/JumpCloud.psd1)
# TITLE="JumpCloud PowerShell Module v$VERSION"
# CHANGELOG=$(cat ${{ github.workspace }}/PowerShell/ModuleChangelog.md |awk "/^## $VERSION/{ f = 1; next } /## [0-9]+.[0-9]+.[0-9]+/{ f = 0 } f")
# TAG="v$VERSION"
# BODY="$TITLE $CHANGELOG"

(gh release view $TAG && echo "Release exists for $TAG") || gh release create $TAG --title "$TITLE" --notes "$BODY" --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# (gh release view $TAG && echo "Release exists for $TAG") || gh release create $TAG --title "$TITLE" --notes "$BODY" --draft
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Deploy-Nupkg:
needs: [Manual-Approval-Release, Build-Nuspec-Nupkg]
Expand All @@ -157,20 +151,20 @@ jobs:
uses: actions/download-artifact@v4
with:
name: jumpcloud-module-nupkg
- name: Publish
shell: pwsh
run: |
# add nuget source for PSGallery:
dotnet nuget add source "https://www.powershellgallery.com/api/v2/package" --name PSGallery
# get nupkg artifact:
$nupkgPath = (Get-ChildItem -Path:("./*.nupkg")).FullName
# test
$nupkgPath | Should -Exist
Write-Host "Nupkg Artifact Restored: $nupkgPath"
# nuget push from here:
dotnet nuget push $nupkgPath --source PSGallery --api-key $env:NuGetApiKey
env:
NuGetApiKey: ${{ secrets.NUGETAPIKEY }}
# - name: Publish
# shell: pwsh
# run: |
# # add nuget source for PSGallery:
# dotnet nuget add source "https://www.powershellgallery.com/api/v2/package" --name PSGallery
# # get nupkg artifact:
# $nupkgPath = (Get-ChildItem -Path:("./*.nupkg")).FullName
# # test
# $nupkgPath | Should -Exist
# Write-Host "Nupkg Artifact Restored: $nupkgPath"
# # nuget push from here:
# dotnet nuget push $nupkgPath --source PSGallery --api-key $env:NuGetApiKey
# env:
# NuGetApiKey: ${{ secrets.NUGETAPIKEY }}

Cleanup-Cache:
needs: Deploy-Nupkg
Expand Down
2 changes: 1 addition & 1 deletion PowerShell/JumpCloud Module/Docs/JumpCloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: JumpCloud
Module Guid: 31c023d1-a901-48c4-90a3-082f91b31646
Download Help Link: https://github.com/TheJumpCloud/support/wiki
Help Version: 2.13.1
Help Version: 2.13.2
Locale: en-Us
---

Expand Down
64 changes: 32 additions & 32 deletions PowerShell/JumpCloud Module/JumpCloud.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'JumpCloud.psm1'

# Version number of this module.
ModuleVersion = '2.13.1'
ModuleVersion = '2.13.2'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -51,8 +51,8 @@ PowerShellVersion = '4.0'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @('JumpCloud.SDK.DirectoryInsights',
'JumpCloud.SDK.V1',
RequiredModules = @('JumpCloud.SDK.DirectoryInsights',
'JumpCloud.SDK.V1',
'JumpCloud.SDK.V2')

# Assemblies that must be loaded prior to importing this module
Expand All @@ -71,35 +71,35 @@ RequiredModules = @('JumpCloud.SDK.DirectoryInsights',
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Add-JCAssociation', 'Add-JCCommandTarget', 'Add-JCGsuiteMember',
'Add-JCOffice365Member', 'Add-JCRadiusReplyAttribute',
'Add-JCSystemGroupMember', 'Add-JCSystemUser',
'Add-JCUserGroupMember', 'Backup-JCOrganization', 'Connect-JCOnline',
'Copy-JCAssociation', 'Get-JCAdmin', 'Get-JCAssociation',
'Get-JCBackup', 'Get-JCCloudDirectory', 'Get-JCCommand',
'Get-JCCommandResult', 'Get-JCCommandTarget', 'Get-JCEvent',
'Get-JCEventCount', 'Get-JCGroup', 'Get-JCOrganization', 'Get-JCPolicy',
'Get-JCPolicyResult', 'Get-JCPolicyTargetGroup',
'Get-JCPolicyTargetSystem', 'Get-JCRadiusReplyAttribute',
'Get-JCRadiusServer', 'Get-JCScheduledUserstate', 'Get-JCSystem',
'Get-JCSystemApp', 'Get-JCSystemGroupMember', 'Get-JCSystemInsights',
'Get-JCSystemUser', 'Get-JCUser', 'Get-JCUserGroupMember',
'Import-JCCommand', 'Import-JCMSPFromCSV', 'Import-JCUsersFromCSV',
'Invoke-JCCommand', 'Invoke-JCDeployment', 'New-JCCommand',
'New-JCDeploymentTemplate', 'New-JCImportTemplate',
'New-JCMSPImportTemplate', 'New-JCPolicy', 'New-JCRadiusServer',
'New-JCSystemGroup', 'New-JCUser', 'New-JCUserGroup',
'Remove-JCAssociation', 'Remove-JCCommand', 'Remove-JCCommandResult',
'Remove-JCCommandTarget', 'Remove-JCGsuiteMember',
'Remove-JCOffice365Member', 'Remove-JCPolicy',
'Remove-JCRadiusReplyAttribute', 'Remove-JCRadiusServer',
'Remove-JCSystem', 'Remove-JCSystemGroup',
'Remove-JCSystemGroupMember', 'Remove-JCSystemUser', 'Remove-JCUser',
'Remove-JCUserGroup', 'Remove-JCUserGroupMember',
'Send-JCPasswordReset', 'Set-JCCloudDirectory', 'Set-JCCommand',
'Set-JCOrganization', 'Set-JCPolicy', 'Set-JCRadiusReplyAttribute',
'Set-JCRadiusServer', 'Set-JCSettingsFile', 'Set-JCSystem',
'Set-JCSystemUser', 'Set-JCUser', 'Set-JCUserGroupLDAP',
FunctionsToExport = 'Add-JCAssociation', 'Add-JCCommandTarget', 'Add-JCGsuiteMember',
'Add-JCOffice365Member', 'Add-JCRadiusReplyAttribute',
'Add-JCSystemGroupMember', 'Add-JCSystemUser',
'Add-JCUserGroupMember', 'Backup-JCOrganization', 'Connect-JCOnline',
'Copy-JCAssociation', 'Get-JCAdmin', 'Get-JCAssociation',
'Get-JCBackup', 'Get-JCCloudDirectory', 'Get-JCCommand',
'Get-JCCommandResult', 'Get-JCCommandTarget', 'Get-JCEvent',
'Get-JCEventCount', 'Get-JCGroup', 'Get-JCOrganization', 'Get-JCPolicy',
'Get-JCPolicyResult', 'Get-JCPolicyTargetGroup',
'Get-JCPolicyTargetSystem', 'Get-JCRadiusReplyAttribute',
'Get-JCRadiusServer', 'Get-JCScheduledUserstate', 'Get-JCSystem',
'Get-JCSystemApp', 'Get-JCSystemGroupMember', 'Get-JCSystemInsights',
'Get-JCSystemUser', 'Get-JCUser', 'Get-JCUserGroupMember',
'Import-JCCommand', 'Import-JCMSPFromCSV', 'Import-JCUsersFromCSV',
'Invoke-JCCommand', 'Invoke-JCDeployment', 'New-JCCommand',
'New-JCDeploymentTemplate', 'New-JCImportTemplate',
'New-JCMSPImportTemplate', 'New-JCPolicy', 'New-JCRadiusServer',
'New-JCSystemGroup', 'New-JCUser', 'New-JCUserGroup',
'Remove-JCAssociation', 'Remove-JCCommand', 'Remove-JCCommandResult',
'Remove-JCCommandTarget', 'Remove-JCGsuiteMember',
'Remove-JCOffice365Member', 'Remove-JCPolicy',
'Remove-JCRadiusReplyAttribute', 'Remove-JCRadiusServer',
'Remove-JCSystem', 'Remove-JCSystemGroup',
'Remove-JCSystemGroupMember', 'Remove-JCSystemUser', 'Remove-JCUser',
'Remove-JCUserGroup', 'Remove-JCUserGroupMember',
'Send-JCPasswordReset', 'Set-JCCloudDirectory', 'Set-JCCommand',
'Set-JCOrganization', 'Set-JCPolicy', 'Set-JCRadiusReplyAttribute',
'Set-JCRadiusServer', 'Set-JCSettingsFile', 'Set-JCSystem',
'Set-JCSystemUser', 'Set-JCUser', 'Set-JCUserGroupLDAP',
'Update-JCModule', 'Update-JCMSPFromCSV', 'Update-JCUsersFromCSV'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
Expand Down
16 changes: 16 additions & 0 deletions PowerShell/ModuleChangelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 2.13.2


Release Date: August 20, 2024

#### RELEASE NOTES

```
TEST - DO NOT MERGE
```

#### FEATURES:

* Get-JCAdmin - Returns administrators in your organization
* MSP/MTP tenants can query multiple organizations or individual organizations

## 2.13.1

Release Date: August 20, 2024
Expand Down

0 comments on commit f6220ee

Please sign in to comment.