Skip to content

Commit

Permalink
fix gha environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
LabhanshAgrawal committed Jun 14, 2023
1 parent a519c28 commit 057a3a5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,22 @@ jobs:
- ubuntu-20.04
- windows-latest
fail-fast: false
env:
CSC_LINK: ${{ secrets.MAC_CERT_P12_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_P12_PASSWORD }}
WIN_CSC_LINK: ${{ secrets.WIN_CERT_P12_BASE64 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_P12_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
steps:
- name: Cleanup Environment variables
run: |
if [ -z "$CSC_LINK" ] ; then unset CSC_LINK ; fi
if [ -z "$CSC_KEY_PASSWORD" ] ; then unset CSC_KEY_PASSWORD ; fi
if [ -z "$WIN_CSC_LINK" ] ; then unset WIN_CSC_LINK ; fi
if [ -z "$WIN_CSC_KEY_PASSWORD" ] ; then unset WIN_CSC_KEY_PASSWORD ; fi
if [ -z "$APPLE_ID" ] ; then unset APPLE_ID ; fi
if [ -z "$APPLE_APP_SPECIFIC_PASSWORD" ] ; then unset APPLE_APP_SPECIFIC_PASSWORD ; fi
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -46,21 +61,6 @@ jobs:
run: |
cp build/canary.ico build/icon.ico
cp build/canary.icns build/icon.icns
- name: Set Environment variables
run: |
if [ ! -z "$CSC_LINK" ] ; then echo "CSC_LINK=$CSC_LINK" >> $GITHUB_ENV ; fi
if [ ! -z "$CSC_KEY_PASSWORD" ] ; then echo "CSC_KEY_PASSWORD=$CSC_KEY_PASSWORD" >> $GITHUB_ENV ; fi
if [ ! -z "$WIN_CSC_LINK" ] ; then echo "WIN_CSC_LINK=$WIN_CSC_LINK" >> $GITHUB_ENV ; fi
if [ ! -z "$WIN_CSC_KEY_PASSWORD" ] ; then echo "WIN_CSC_KEY_PASSWORD=$WIN_CSC_KEY_PASSWORD" >> $GITHUB_ENV ; fi
if [ ! -z "$APPLE_ID" ] ; then echo "APPLE_ID=$APPLE_ID" >> $GITHUB_ENV ; fi
if [ ! -z "$APPLE_APP_SPECIFIC_PASSWORD" ] ; then echo "APPLE_APP_SPECIFIC_PASSWORD=$APPLE_APP_SPECIFIC_PASSWORD" >> $GITHUB_ENV ; fi
env:
CSC_LINK: ${{ secrets.MAC_CERT_P12_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_P12_PASSWORD }}
WIN_CSC_LINK: ${{ secrets.WIN_CERT_P12_BASE64 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_P12_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
- name: Build
run: yarn run dist
- name: Archive Build Artifacts
Expand Down

0 comments on commit 057a3a5

Please sign in to comment.