Skip to content

Commit

Permalink
Merge pull request #700 from mountaindude/master
Browse files Browse the repository at this point in the history
...
  • Loading branch information
mountaindude authored Feb 17, 2024
2 parents 0864fe4 + 9749059 commit eb6e585
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 32 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,19 @@ jobs:
- name: Show github.ref
run: echo "$GITHUB_REF"

- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
if: github.repository_owner == 'ptarmiganlabs'
with:
# command: manifest
# bootstrap-sha: ad2255c9c24f68d0adb5255159fa5a849ab880e4
# last-release-sha: b6266be9857c88405364c8af54fbfbed83bb9f66
# release-as: 9.1.0
token: ${{ secrets.RELEASE_PLEASE_PAT }}
# optional. customize path to release-please-config.json
config-file: release-please-config.json
# optional. customize path to .release-please-manifest.json
manifest-file: .release-please-manifest.json
release-type: node
package-name: butler-sos
default-branch: master
prerelease: false
release-search-depth: 5
commit-search-depth: 200
draft: true
changelog-types: '[{"type": "feat","section": "Features","hidden": false},{"type": "fix","section": "Bug Fixes","hidden": false},{"type": "chore","section": "Miscellaneous","hidden": false},{"type": "refactor","section": "Refactoring","hidden": false},{"type": "docs","section": "Documentation","hidden": false},{"type": "build","section": "Miscellaneous","hidden": false}]'
target-branch: master

- name: Show output from Release-Please
- name: Show output from Release-Please
if: always()
env:
RELEASE_PLEASE_OUTPUT: ${{ toJSON(steps.release.outputs) }}
Expand Down Expand Up @@ -99,7 +94,7 @@ jobs:
- name: Install dependencies
run: |
pwd
npm ci
npm ci --include=prod
- name: Build binaries
run: |
Expand Down Expand Up @@ -186,9 +181,10 @@ jobs:
env:
DIST_FILE_NAME: butler-sos
GITHUB_TOKEN: ${{ secrets.PAT }}
CODESIGN_PWD: ${{ secrets.WIN_CODESIGN_PWD}}
CODESIGN_INTERMEDIATE_BASE64: ${{ secrets.WIN_CODESIGN_INTERMEDIATE_BASE64 }}
CODESIGN_BASE64: ${{ secrets.WIN_CODESIGN_BASE64}}
# CODESIGN_PWD: ${{ secrets.WIN_CODESIGN_PWD}}
# CODESIGN_INTERMEDIATE_BASE64: ${{ secrets.WIN_CODESIGN_INTERMEDIATE_BASE64 }}
# CODESIGN_BASE64: ${{ secrets.WIN_CODESIGN_BASE64}}
CODESIGN_WIN_THUMBPRINT: ${{ secrets.WIN_CODESIGN_THUMBPRINT}}
steps:
- name: Release tag and upload url from previous job
run: |
Expand All @@ -210,7 +206,7 @@ jobs:
- name: Install dependencies
run: |
pwd
npm ci
npm ci --include=prod
- name: Build binaries
run: |
Expand Down Expand Up @@ -302,7 +298,7 @@ jobs:
- name: Install dependencies
run: |
pwd
npm ci
npm ci --include=prod
- name: Build binaries
run: |
Expand Down
48 changes: 35 additions & 13 deletions .github/workflows/insiders-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,51 @@ jobs:
matrix:
os: [winsrv-2016, mac-build1, ubuntu-latest]
include:
- os: winsrv-2016
- os: Windows
build: |
./node_modules/.bin/esbuild src/bundle.js --bundle --external:axios --external:xdg-open --external:enigma.js --outfile=build.cjs --format=cjs --platform=node --target=node18 --minify
pkg --output "./${env:DIST_FILE_NAME}.exe" -t node18-win-x64 ./build.cjs --config package.json --compress GZip
dir
# # Extract signing certificate to files on disk
# New-Item -ItemType directory -Path certificate
# Set-Content -Path certificate\certificate.txt -Value $env:CODESIGN_BASE64
# certutil -decode certificate\certificate.txt certificate\certificate.pfx
# Set-Content -Path certificate\intermediate.txt -Value $env:CODESIGN_INTERMEDIATE_BASE64
# certutil -decode certificate\intermediate.txt certificate\intermediate.crt
# $processOptions = @{
# FilePath = "C:\Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/signtool.exe"
# Wait = $true
# ArgumentList = "sign", "/fd", "SHA256", "/p", "$env:CODESIGN_PWD", "/ac", "certificate\intermediate.crt", "/f", "certificate\certificate.pfx", "/tr", "http://timestamp.sectigo.com/rfc3161", "/td", "sha256", "./${env:DIST_FILE_NAME}.exe"
# WorkingDirectory = "."
# NoNewWindow = $true
# }
# Start-Process @processOptions
# Sign the executable
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value $env:CODESIGN_BASE64
certutil -decode certificate\certificate.txt certificate\certificate.pfx
Set-Content -Path certificate\intermediate.txt -Value $env:CODESIGN_INTERMEDIATE_BASE64
certutil -decode certificate\intermediate.txt certificate\intermediate.crt
# 1st signing
$processOptions1 = @{
FilePath = "C:\Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/signtool.exe"
Wait = $true
ArgumentList = "sign", "/sha1", "$env:CODESIGN_WIN_THUMBPRINT", "/tr", "http://time.certum.pl", "/td", "sha256", "/fd", "sha1", "/v", "./${env:DIST_FILE_NAME}.exe"
WorkingDirectory = "."
NoNewWindow = $true
}
Start-Process @processOptions1
$processOptions = @{
# 2nd signing
$processOptions2 = @{
FilePath = "C:\Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/signtool.exe"
Wait = $true
ArgumentList = "sign", "/fd", "SHA256", "/p", "$env:CODESIGN_PWD", "/ac", "certificate\intermediate.crt", "/f", "certificate\certificate.pfx", "/tr", "http://timestamp.sectigo.com/rfc3161", "/td", "sha256", "./${env:DIST_FILE_NAME}.exe"
ArgumentList = "sign", "/sha1", "$env:CODESIGN_WIN_THUMBPRINT", "/tr", "http://time.certum.pl", "/td", "sha256", "/fd", "sha256", "/v", "./${env:DIST_FILE_NAME}.exe"
WorkingDirectory = "."
NoNewWindow = $true
}
Start-Process @processOptions
Start-Process @processOptions2
Remove-Item -Recurse -Force certificate
# Remove-Item -Recurse -Force certificate
# # Create release binary
# mkdir release-binaries-win
Expand Down Expand Up @@ -198,9 +219,10 @@ jobs:
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
CODESIGN_PWD: ${{ secrets.WIN_CODESIGN_PWD}}
CODESIGN_INTERMEDIATE_BASE64: ${{ secrets.WIN_CODESIGN_INTERMEDIATE_BASE64 }}
CODESIGN_BASE64: ${{ secrets.WIN_CODESIGN_BASE64}}
# CODESIGN_PWD: ${{ secrets.WIN_CODESIGN_PWD}}
# CODESIGN_INTERMEDIATE_BASE64: ${{ secrets.WIN_CODESIGN_INTERMEDIATE_BASE64 }}
# CODESIGN_BASE64: ${{ secrets.WIN_CODESIGN_BASE64}}
CODESIGN_WIN_THUMBPRINT: ${{ secrets.WIN_CODESIGN_THUMBPRINT}}
run: |
pwd
${{ matrix.build }}
Expand Down
47 changes: 47 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"bootstrap-sha": "f65d47539fbf04124184cc50920652d226723f2c",
"last-release-sha": "f65d47539fbf04124184cc50920652d226723f2c",
"release-as": "9.9.0",
"release-type": "node",
"prerelease": false,
"draft": true,
"release-search-depth": 10,
"commit-search-depth": 200,
"changelog-sections": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous",
"hidden": false
},
{
"type": "refactor",
"section": "Refactoring",
"hidden": false
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "build",
"section": "Miscellaneous",
"hidden": false
}
],
"packages": {
".": {
"package-name": "butler-sos"
}
}
}

0 comments on commit eb6e585

Please sign in to comment.