Skip to content

build javascriptcore #15

build javascriptcore

build javascriptcore #15

Workflow file for this run

name: build javascriptcore
on:
workflow_dispatch:
inputs:
tag_date:
description: 'tag date'
required: true
build_windows:
description: 'Build for Windows platform'
type: boolean
default: true
required: false
build_macos:
description: 'Build for MacOS platform'
type: boolean
default: true
required: false
build_linux:
description: 'Build for Linux platform'
type: boolean
default: true
required: false
do_publish:
description: 'Publish a release'
type: boolean
default: true
required: false
jobs:
build_linux:
if: github.event.inputs.build_linux == 'true'
name: Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
bash ./linux64.sh
- uses: actions/upload-artifact@v2
with:
name: jsc_bin
path: $GITHUB_WORKSPACE/jsc_bin/**/*
build_windows:
if: github.event.inputs.build_windows == 'true'
name: Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Run build script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
.\win64.bat
- uses: actions/upload-artifact@v2
with:
name: jsc_bin
path: $GITHUB_WORKSPACE/jsc_bin/**/*
build_macos:
if: github.event.inputs.build_macos == 'true'
name: macOS
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
bash ./osx64.sh
- uses: actions/upload-artifact@v2
with:
name: jsc_bin
path: $GITHUB_WORKSPACE/jsc_bin/**/*
publish:
if: github.event.inputs.do_publish == 'true'
runs-on: ubuntu-20.04
needs: [build_linux,build_windows,build_macos]
steps:
- uses: actions/download-artifact@v1
with:
name: jsc_bin
path: jsc_bin/
- name: Create Release Asset
run: |
cd jsc_bin/ && tar cvfz ../jsc_bin_${{github.event.inputs.tag_date}}.tgz jsc_bin && cd -
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: jsc_bin_${{ github.event.inputs.tag_date }}
release_name: jsc_bin_${{ github.event.inputs.tag_date }}
draft: false
prerelease: false
- name: Upload jscore bin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./jsc_bin_${{github.event.inputs.tag_date}}.tgz
asset_name: jsc_bin_${{github.event.inputs.tag_date}}.tgz
asset_content_type: application/tgz