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