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 1 commit
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
17 changes: 16 additions & 1 deletion .github/workflows/BUILD_ON_DEMAND.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ 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/[email protected]
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: Decode Secret
if: ${{ runner.os == 'Windows' }}
run: echo "${{ steps.windows-secrets.outputs.CSC_CERT_WIN }}" | base64 -i --decode > ./cert.pfx
marstamm marked this conversation as resolved.
Show resolved Hide resolved
- name: Build distro (Windows)
if: ${{ runner.os == 'Windows' }}
env:
Expand All @@ -67,6 +82,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: "./cert.pfx"
marstamm marked this conversation as resolved.
Show resolved Hide resolved
CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
run: npm run build -- --win --publish --on-demand
17 changes: 16 additions & 1 deletion .github/workflows/NIGHTLY.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,25 @@ jobs:
UPDATES_SERVER_PRODUCT_NAME: "${{ secrets.UPDATES_SERVER_PRODUCT_NAME }}"
run: npm run build -- --mac

- name: Import Secrets (Windows)
id: windows-secrets
uses: hashicorp/[email protected]
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: Decode Secret
if: ${{ runner.os == 'Windows' }}
run: echo "${{ steps.windows-secrets.outputs.CSC_CERT_WIN }}" | base64 -i --decode > ./cert.pfx
- name: Build nightly (Windows)
if: ${{ runner.os == 'Windows' }}
env:
CSC_LINK: "${{ secrets.WIN_CSC_LINK }}"
CSC_LINK: "./cert.pfx"
CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
MIXPANEL_TOKEN: "${{ secrets.MIXPANEL_PROJECT_TOKEN }}"
MIXPANEL_STAGE: "int"
Expand Down
19 changes: 18 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,26 @@ jobs:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
NODE_ENV: "production"
run: npm run build -- --mac --publish

- name: Import Secrets (Windows)
id: windows-secrets
uses: hashicorp/[email protected]
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: Decode Secret
if: ${{ runner.os == 'Windows' }}
run: echo "${{ steps.windows-secrets.outputs.CSC_CERT_WIN }}" | base64 -i --decode > ./cert.pfx
- name: Build release (Windows)
if: ${{ runner.os == 'Windows' }}
env:
CSC_LINK: "${{ secrets.WIN_CSC_LINK }}"
CSC_LINK: "./cert.pfx"
CSC_KEY_PASSWORD: "${{ secrets.WIN_CSC_KEY_PASSWORD }}"
MIXPANEL_TOKEN: "${{ secrets.MIXPANEL_PROJECT_TOKEN }}"
MIXPANEL_STAGE: "prod"
Expand Down
Loading