chore: test #9
Workflow file for this run
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: CI Cortex | |
on: | |
push: | |
branches: | |
- chore/test-ci-with-versioning | |
workflow_dispatch: | |
jobs: | |
build-cortex-single-binary: | |
runs-on: ${{ matrix.runs-on }} | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: "linux" | |
name: "amd64" | |
runs-on: "ubuntu-latest" | |
- os: "windows" | |
name: "amd64" | |
runs-on: "windows-2019" | |
- os: "mac" | |
name: "amd64" | |
runs-on: "macos-13" | |
- os: "mac" | |
name: "arm64" | |
runs-on: "macos-latest" | |
steps: | |
- name: Clone | |
id: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install jq | |
uses: dcarbone/[email protected] | |
- name: "Update version by tag" | |
shell: bash | |
run: | | |
echo "Version: ${{ inputs.new_version }}" | |
# Update the version in package.json | |
jq --arg version "${{ inputs.new_version }}" '.version = $version' cortex-js/package.json > /tmp/package.json | |
mv /tmp/package.json cortex-js/package.json | |
- uses: actions/setup-dotnet@v3 | |
if: runner.os == 'Windows' | |
with: | |
dotnet-version: "8.0.x" | |
- name: Install choco on Windows | |
if: runner.os == 'Windows' | |
run: | | |
choco install make -y | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
- run: npm install -g yarn | |
- run: yarn install && yarn build && yarn build:binary | |
working-directory: ./cortex-js | |
- name: Get Cer for code signing | |
if: runner.os == 'macOS' | |
run: base64 -d <<< "$CODE_SIGN_P12_BASE64" > /tmp/codesign.p12 | |
shell: bash | |
env: | |
CODE_SIGN_P12_BASE64: ${{ secrets.CODE_SIGN_P12_BASE64 }} | |
- uses: apple-actions/import-codesign-certs@v2 | |
if: runner.os == 'macOS' | |
with: | |
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }} | |
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }} | |
- name: Code Signing macOS | |
if: runner.os == 'macOS' | |
run: | | |
cd cortex-js | |
make codesign CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}" | |
- name: Post-Bundle | |
run: | | |
cd cortex-js | |
make postbundle | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cortex-${{ matrix.os }}-${{ matrix.name }} | |
path: | | |
./cortex-js/cortex | |
./cortex-js/cortex.exe | |
./cortex-js/setup.exe |