-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add preliminary windows codesigning via signpath
- Loading branch information
Showing
3 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,33 @@ jobs: | |
run: > | ||
cargo wix -v --no-build --nocapture -I install/windows/main.wxs | ||
--target ${{ matrix.target }} | ||
--output target/wix/starship-${{ matrix.target }}.msi | ||
--output target/${{ matrix.target }}/release/starship-${{ matrix.target }}.msi | ||
- name: Sign | Upload [Windows] | ||
continue-on-error: true | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: unsigned-${{ matrix.name }} | ||
path: | | ||
target/${{ matrix.target }}/release/starship.exe | ||
target/${{ matrix.target }}/release/starship-${{ matrix.target }}.msi | ||
- name: Sign | Sign [Windows] | ||
continue-on-error: true | ||
if: matrix.os == 'windows-latest' | ||
uses: signpath/[email protected] | ||
with: | ||
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' | ||
organization-id: '${{ vars.SIGNPATH_ORGANIZATION_ID }}' | ||
project-slug: 'starship' | ||
signing-policy-slug: 'test-signing' | ||
github-artifact-name: 'unsigned-${{ matrix.name }}' | ||
wait-for-completion: false | ||
# TODO use release-signing certificate: | ||
# signing-policy-slug: 'release-signing' | ||
# wait-for-completion: true | ||
# output-artifact-directory: 'target/${{ matrix.target }}/release' | ||
|
||
- name: Post Build | Prepare artifacts [Windows] | ||
if: matrix.os == 'windows-latest' | ||
|
@@ -151,7 +177,7 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
with: | ||
name: starship-${{ matrix.target }}.msi | ||
path: target/wix/starship-${{ matrix.target }}.msi | ||
path: target/${{ matrix.target }}/release/starship-${{ matrix.target }}.msi | ||
|
||
# Notarize starship binaries for MacOS and build notarized pkg installers | ||
notarize_and_pkgbuild: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,7 +201,9 @@ jobs: | |
- name: Build | Installer [Windows] | ||
continue-on-error: true | ||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable' | ||
run: cargo wix --dbg-build -v --nocapture -I install/windows/main.wxs | ||
run: > | ||
cargo wix --dbg-build -v --nocapture -I install/windows/main.wxs | ||
--output target/debug/starship-x86_64-pc-windows-msvc.msi | ||
- name: Build | Chocolatey Package [Windows] | ||
continue-on-error: true | ||
|
@@ -219,6 +221,29 @@ jobs: | |
env: | ||
STARSHIP_VERSION: v1.2.3 | ||
|
||
- name: Sign | Upload Executable [Windows] | ||
uses: actions/upload-artifact@v4 | ||
continue-on-error: true | ||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable' && github.event_name == 'push' | ||
with: | ||
name: windows-executable | ||
path: | | ||
target/debug/starship.exe | ||
target/debug/starship-x86_64-pc-windows-msvc.msi | ||
- name: Sign | Sign Executable [Windows] | ||
uses: signpath/[email protected] | ||
continue-on-error: true | ||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable' && github.event_name == 'push' | ||
with: | ||
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' | ||
organization-id: '${{ vars.SIGNPATH_ORGANIZATION_ID }}' | ||
project-slug: 'starship' | ||
github-artifact-name: 'windows-executable' | ||
signing-policy-slug: 'test-signing' | ||
wait-for-completion: true | ||
output-artifact-directory: target/debug | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
if: github.repository == 'starship/starship' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters