Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use vault for windows certificates #4257

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/BUILD_ON_DEMAND.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ jobs:
CSC_KEY_PASSWORD: "${{ secrets.CSC_KEY_PASSWORD }}"
run: npm run build -- --mac --publish --on-demand

- name: Import Secrets (Windows)
id: windows-secrets
uses: hashicorp/vault-action@v3.0.0
if: ${{ runner.os == 'Windows' }}
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/desktop-modeler/ci/certificates CSC_CERT_WIN;
barmac marked this conversation as resolved.
Show resolved Hide resolved
- name: Build distro (Windows)
if: ${{ runner.os == 'Windows' }}
env:
Expand All @@ -67,6 +79,6 @@ jobs:
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_ON_DEMAND_SECRET_ACCESS_KEY }}"
AWS_REGION: "${{ secrets.AWS_ON_DEMAND_REGION }}"
AWS_BUCKET: "${{ secrets.AWS_ON_DEMAND_BUCKET }}"
CSC_LINK: "${{ secrets.WIN_CSC_LINK }}"
CSC_LINK: "${{ steps.windows-secrets.outputs.CSC_CERT_WIN }}"
CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
run: npm run build -- --win --publish --on-demand
14 changes: 13 additions & 1 deletion .github/workflows/NIGHTLY.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,22 @@ jobs:
UPDATES_SERVER_PRODUCT_NAME: "${{ secrets.UPDATES_SERVER_PRODUCT_NAME }}"
run: npm run build -- --mac

- name: Import Secrets (Windows)
id: windows-secrets
uses: hashicorp/vault-action@v3.0.0
if: ${{ runner.os == 'Windows' }}
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/desktop-modeler/ci/certificates CSC_CERT_WIN;
- name: Build nightly (Windows)
if: ${{ runner.os == 'Windows' }}
env:
CSC_LINK: "${{ secrets.WIN_CSC_LINK }}"
CSC_LINK: "${{ steps.windows-secrets.outputs.CSC_CERT_WIN }}"
CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
MIXPANEL_TOKEN: "${{ secrets.MIXPANEL_PROJECT_TOKEN }}"
MIXPANEL_STAGE: "int"
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/RELEASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
NODE_ENV: "production"
run: npm run build -- --linux --publish

- name: Build release (MacOS)
if: ${{ runner.os == 'macOS' }}
env:
Expand All @@ -74,10 +75,23 @@ jobs:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
NODE_ENV: "production"
run: npm run build -- --mac --publish

- name: Import Secrets (Windows)
id: windows-secrets
uses: hashicorp/vault-action@v3.0.0
if: ${{ runner.os == 'Windows' }}
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/desktop-modeler/ci/certificates CSC_CERT_WIN;
- name: Build release (Windows)
if: ${{ runner.os == 'Windows' }}
env:
CSC_LINK: "${{ secrets.WIN_CSC_LINK }}"
CSC_LINK: "${{ steps.windows-secrets.outputs.CSC_CERT_WIN }}"
CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
MIXPANEL_TOKEN: "${{ secrets.MIXPANEL_PROJECT_TOKEN }}"
MIXPANEL_STAGE: "prod"
Expand Down
1 change: 1 addition & 0 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"afterPack": "./tasks/after-pack.js",
"afterSign": "./tasks/after-sign.js",
"win": {
"certificateSha1": "98B80B9F9F7526306371EEA8FB5FB52B945B4A90",
"target": [
{
"target": "zip",
Expand Down
Loading