Skip to content

Commit 2245477

Browse files
committed
feat: Windows Signing
1 parent e7eec56 commit 2245477

5 files changed

Lines changed: 47 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- main
10+
- windowsSigning
1011

1112
jobs:
1213
build-and-publish:
@@ -70,4 +71,43 @@ jobs:
7071
if: matrix.platform == 'linux'
7172
env:
7273
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73-
run: npm exec electron-builder -- --publish always --linux
74+
run: npm exec electron-builder -- --publish always --linux
75+
76+
- name: Get package version
77+
if: matrix.platform == 'win'
78+
id: get-version
79+
shell: bash
80+
run: |
81+
VERSION=$(node -p "require('./package.json').version")
82+
echo "version=$VERSION" >> $GITHUB_OUTPUT
83+
echo "artifact-name=Cobolt-Setup-$VERSION.exe" >> $GITHUB_OUTPUT
84+
85+
- name: Check if release already exists
86+
if: matrix.platform == 'win'
87+
id: check-release
88+
shell: bash
89+
run: |
90+
RELEASE_EXISTS=$(gh release view "v${{ steps.get-version.outputs.version }}" --json assets,draft --jq 'if .draft == false then .assets | map(select(.name == "${{ steps.get-version.outputs.artifact-name }}")) | length else 0 end' 2>/dev/null || echo "0")
91+
echo "release-exists=$RELEASE_EXISTS" >> $GITHUB_OUTPUT
92+
env:
93+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
95+
- name: upload-unsigned-artifact
96+
id: upload-unsigned-artifact
97+
if: matrix.platform == 'win' && steps.check-release.outputs.release-exists == '0'
98+
uses: actions/upload-artifact@v4
99+
with:
100+
name: unsigned-intaller
101+
retention-days: 1
102+
path: CoboltSetup\output\CoboltSetup_${{ steps.get-version.outputs.version }}.exe
103+
104+
- name: Sign artifact
105+
if: matrix.platform == 'win' && steps.check-release.outputs.release-exists == '0'
106+
uses: signpath/github-action-submit-signing-request@v1.1
107+
with:
108+
api-token: ${{secrets.SIGNPATH_API_TOKEN}}
109+
organization-id: 3fe5dc9d-e6f6-4c25-83e5-70c5844441b9
110+
project-slug: cobolt
111+
signing-policy-slug: test-signing
112+
github-artifact-id: ${{steps.upload-unsigned-artifact.outputs.artifact-id}}
113+
wait-for-completion: true

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cobolt",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "Your personal AI companion",
55
"keywords": [],
66
"repository": {

release/app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cobolt",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "Cobolt",
55
"license": "MIT",
66
"author": {

0 commit comments

Comments
 (0)