Skip to content

Commit

Permalink
chore: added ci (#605)
Browse files Browse the repository at this point in the history
* chore: added ci

* chore: fix workflow name

* chore: fix runs on

* chore: removed service account

* chore: fix wrong identity provider name

* chore: fix download jsign

* chore: fix base64

* chore: fix cert to file

* chore: fix sign command

* chore: fix jsign file name

* chore: install jsign with choco

* chore: fix prod release

* chore: removed unused file
  • Loading branch information
agallardol authored Jan 20, 2025
1 parent 01e91d1 commit 1da465a
Showing 1 changed file with 36 additions and 38 deletions.
74 changes: 36 additions & 38 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,47 +256,45 @@ jobs:
NODE_OPTIONS: "--max_old_space_size=8192"

# --- Signing process ---
# - name: 'Google auth'
# if: ${{ matrix.arch == 'x86_64-pc-windows-msvc' }}
# id: 'auth'
# uses: 'google-github-actions/auth@v2'
# with:
# workload_identity_provider: '${{ secrets.WIF_PROVIDER }}'
# service_account: '${{ secrets.SERVICE_ACCOUNT }}'
- name: 'Google auth'
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
project_id: 'shinkai-412316'
workload_identity_provider: 'projects/511721742630/locations/global/workloadIdentityPools/github/providers/shinkai-apps'

# - name: 'Set up Cloud SDK'
# if: ${{ matrix.arch == 'x86_64-pc-windows-msvc' }}
# uses: 'google-github-actions/setup-gcloud@v2'
# with:
# project_id: 'shinkai-412316'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
project_id: 'shinkai-412316'

- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'

# - name: Set up Java
# if: ${{ matrix.arch == 'x86_64-pc-windows-msvc' }}
# uses: actions/setup-java@v4
# with:
# java-version: 17
# distribution: 'temurin'
# - name: Download Jsign
# run: wget https://github.com/ebourg/jsign/releases/download/7.0/jsign-7.0.jar

# - name: Cert to file
# if: ${{ matrix.arch == 'x86_64-pc-windows-msvc' }}
# run: |
# echo -n "$EV_CODE_SIGNING_CERTIFICATE" | base64 --decode -o OS20241029372986.pem

# - name: Sign
# if: ${{ matrix.arch == 'x86_64-pc-windows-msvc' }}
# run: >
# java -jar jsign.jar \
# --storetype GOOGLECLOUD \
# --storepass "$(gcloud auth print-access-token)" \
# --keystore "projects/shinkai-412316/locations/us/keyRings/shinkai-apps" \
# --alias "EVCodeSigning" \
# --certfile "OS20241029372986.pem" \
# --tsmode RFC3161 \
# --tsaurl http://timestamp.globalsign.com/tsa/r6advanced1 \
# ${{ matrix.build_output_file_path }}
- name: Download Jsign
shell: bash
run: choco install jsign

- name: Cert to file
shell: bash
run: |
echo -n "$EV_CODE_SIGNING_CERTIFICATE" > OS20241029372986.cer
- name: Sign
shell: bash
run: >
jsign \
--storetype GOOGLECLOUD \
--storepass "$(gcloud auth print-access-token)" \
--keystore "projects/shinkai-412316/locations/us/keyRings/shinkai-apps" \
--alias "EVCodeSigning" \
--certfile "OS20241029372986.cer" \
--tsmode RFC3161 \
--tsaurl http://timestamp.globalsign.com/tsa/r6advanced1 \
${{ matrix.build_output_file_path }}
# ---

- name: Prepare binary files
Expand Down

0 comments on commit 1da465a

Please sign in to comment.