chore(core): updated dependencies #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@master | |
with: | |
node-version: 14 | |
- name: Cache ✨ | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-cache-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cache- | |
- name: Windows Codesign executable | |
if: matrix.os == 'windows-latest' && startsWith(github.event.head_commit.message,'v1.') | |
run: | | |
New-Item -ItemType directory -Path certificate | |
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WINDOWS_PFX }}' | |
certutil -decode certificate\certificate.txt certificate\certificate.pfx | |
- name: OSX Codesign executable | |
if: matrix.os == 'macOS-latest' && startsWith(github.event.head_commit.message,'v1.') | |
env: | |
MACOS_CERTIFICATE_APP: ${{ secrets.MACOS_CERTIFICATE_APP }} | |
MACOS_CERTIFICATE_APP_PWD: ${{ secrets.MACOS_CERTIFICATE_APP_PWD }} | |
MACOS_CERTIFICATE_INSTALLER: ${{ secrets.MACOS_CERTIFICATE_INSTALLER }} | |
MACOS_CERTIFICATE_INSTALLER_PWD: ${{ secrets.MACOS_CERTIFICATE_INSTALLER_PWD }} | |
MACOS_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PWD }} | |
run: | | |
# create variables | |
CERTIFICATE_PATH_APP=$RUNNER_TEMP/certificate_app.p12 | |
CERTIFICATE_PATH_INSTALLER=$RUNNER_TEMP/certificate_installer.p12 | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate and provisioning profile from secrets | |
echo -n "$MACOS_CERTIFICATE_APP" | base64 --decode --output $CERTIFICATE_PATH_APP | |
echo -n "$MACOS_CERTIFICATE_INSTALLER" | base64 --decode --output $CERTIFICATE_PATH_INSTALLER | |
# create temporary keychain | |
security create-keychain -p "$MACOS_KEYCHAIN_PWD" $KEYCHAIN_PATH | |
security default-keychain -s $KEYCHAIN_PATH | |
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
security unlock-keychain -p "$MACOS_KEYCHAIN_PWD" $KEYCHAIN_PATH | |
# import certificate to keychain | |
security import $CERTIFICATE_PATH_APP -P "$MACOS_CERTIFICATE_APP_PWD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security import $CERTIFICATE_PATH_INSTALLER -P "$MACOS_CERTIFICATE_INSTALLER_PWD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
- name: install dependencies | |
run: yarn install | |
- name: test | |
run: yarn test:cov | |
- name: Publish coverage | |
if: matrix.os != 'windows-latest' | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }} | |
- name: deploy | |
if: startsWith(github.event.head_commit.message,'v1.') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }} | |
MAC_APPLE_ID: ${{ secrets.MAC_APPLE_ID }} | |
MAC_APPLE_ID_PWD: ${{ secrets.MAC_APPLE_ID_PWD }} | |
MAC_DEVELOPER_ID: ${{ secrets.MAC_DEVELOPER_ID }} | |
WINDOWS_PFX_SECRET: ${{ secrets.WINDOWS_PFX_SECRET }} | |
run: yarn deploy | |
- name: prepare chocolatey | |
if: matrix.os == 'windows-latest' && startsWith(github.event.head_commit.message,'v1.') | |
run: yarn chocolatey:prepare | |
- name: pack chocolatey | |
if: matrix.os == 'windows-latest' && startsWith(github.event.head_commit.message,'v1.') | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: pack .\build\chocolatey\barklarm.nuspec | |
- name: push chocolatey | |
continue-on-error: true | |
if: matrix.os == 'windows-latest' && startsWith(github.event.head_commit.message,'v1.') | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: push -s https://push.chocolatey.org/ -k '${{ secrets.CHOCOLATEY_KEY }}' | |