sign-cli.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: sign-cli
  2. on:
  3. push:
  4. branches:
  5. - brendan/desktop-signpath
  6. workflow_dispatch:
  7. permissions:
  8. contents: read
  9. actions: read
  10. jobs:
  11. sign-cli:
  12. runs-on: blacksmith-4vcpu-ubuntu-2404
  13. if: github.repository == 'anomalyco/opencode'
  14. steps:
  15. - uses: actions/checkout@v3
  16. with:
  17. fetch-tags: true
  18. - uses: ./.github/actions/setup-bun
  19. with:
  20. cross-compile: "true"
  21. - name: Build
  22. run: |
  23. ./packages/opencode/script/build.ts --all
  24. - name: Upload unsigned Windows CLI
  25. id: upload_unsigned_windows_cli
  26. uses: actions/upload-artifact@v4
  27. with:
  28. name: unsigned-opencode-windows-cli
  29. path: packages/opencode/dist/opencode-windows-x64/bin/opencode.exe
  30. if-no-files-found: error
  31. - name: Submit SignPath signing request
  32. id: submit_signpath_signing_request
  33. uses: signpath/github-action-submit-signing-request@v1
  34. with:
  35. api-token: ${{ secrets.SIGNPATH_API_KEY }}
  36. organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
  37. project-slug: ${{ secrets.SIGNPATH_PROJECT_SLUG }}
  38. signing-policy-slug: ${{ secrets.SIGNPATH_SIGNING_POLICY_SLUG }}
  39. artifact-configuration-slug: ${{ secrets.SIGNPATH_ARTIFACT_CONFIGURATION_SLUG }}
  40. github-artifact-id: ${{ steps.upload_unsigned_windows_cli.outputs.artifact-id }}
  41. wait-for-completion: true
  42. output-artifact-directory: signed-opencode-cli
  43. - name: Upload signed Windows CLI
  44. uses: actions/upload-artifact@v4
  45. with:
  46. name: signed-opencode-windows-cli
  47. path: signed-opencode-cli/*.exe
  48. if-no-files-found: error