Skip to content

Commit

Permalink
add sliver armory support
Browse files Browse the repository at this point in the history
  • Loading branch information
c2biz committed Aug 30, 2023
1 parent ba23103 commit 07c0519
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/autorelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release

on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
branches: ["master"]

jobs:

linux-windows-build:
name: CSharp Build
if: startsWith( github.ref, 'refs/tags/v')
runs-on: windows-2019
timeout-minutes: 45
steps:

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1

- name: Check out code
uses: actions/checkout@v2

- name: Git Fetch Tags
run: git fetch --prune --unshallow --tags -f

- name: Download Tools
run: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe -OutFile jq.exe
Invoke-WebRequest -Uri https://github.com/moloch--/minisign/releases/download/v0.2.1/minisign.exe -OutFile minisign.exe
- name: MSBuild
run: |
nuget.exe restore .\SharpSCCM.sln
msbuild -p:Configuration=Release -p:Platform='Any CPU' /p:OutputPath=compiled_full/
mkdir compiled
Copy-Item -Path .\compiled_full\SharpSCCM_merged.exe -Destination compiled\SharpSCCM_merged.exe
- name: Build Package
# Powershell is utter fucking trash.
run: |
ls
$Version = git.exe describe --tags --abbrev=0
$Version = "`"$Version`""
Get-Content -Path alias.json | .\jq.exe ".version |= `"$Version`"" > ./compiled/alias.json
Copy-Item -Path LICENSE.txt -Destination compiled\LICENSE
cd compiled
tar.exe -czvf ..\SharpSCCM.tar.gz .
- name: Sign Package
run: |
Write-Output "${{ secrets.MINISIGN_PRIVATE_KEY }}" > minisign.key
$Content1 = Get-Content -Path ./compiled/alias.json
$Bytes = [System.Text.Encoding]::UTF8.GetBytes($Content1)
$Encoded = [System.Convert]::ToBase64String($Bytes)
.\minisign.exe -s minisign.key -S -m SharpSCCM.tar.gz -t "$Encoded" -x SharpSCCM.minisig
- name: "Publish Release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
SharpSCCM.minisig
SharpSCCM.tar.gz
25 changes: 25 additions & 0 deletions alias.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "SharpSCCM",
"version": "v0.0.0",
"command_name": "sharpsccm",
"original_author": "Mayyhem",
"repo_url": "https://github.com/sliverarmory/SharpSCCM",
"help": "A C# utility for interacting with SCCM",
"entrypoint": "Main",
"allow_args": true,
"default_args": "-h",
"is_reflective": false,
"is_assembly": true,
"files": [
{
"os": "windows",
"arch": "amd64",
"path": "SharpSCCM_merged.exe"
},
{
"os": "windows",
"arch": "386",
"path": "SharpSCCM_merged.exe"
}
]
}

0 comments on commit 07c0519

Please sign in to comment.