Bump shelljs from 0.8.4 to 0.8.5 #28
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 | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ "streamlabs" ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ "streamlabs" ] | |
env: | |
PACKAGE_DIRECTORY: font-manager | |
PACKAGE_NAME: font-manager | |
BUILD_CONFIGURATION: RelWithDebInfo | |
BUILD_DIRECTORY: "build" | |
DISTRIBUTE_DIRECTORY: "distribute" | |
RELEASE_BUCKET: "slobs-font-manager" | |
ELECTRON_VERSION: "v25.8.0" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: 'Build a package' | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Show GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache --check-cache | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1 | |
- name: Configure | |
run: cmake -H"${{ github.workspace }}" -B"${{env.BUILD_DIRECTORY}}" -G"Visual Studio 17 2022" -A x64 -DNODEJS_VERSION="${{env.ELECTRON_VERSION}}" -DCMAKE_INSTALL_PREFIX="${{env.INSTALL_PACKAGE_PATH}}" | |
env: | |
INSTALL_PACKAGE_PATH: "${{env.BUILD_DIRECTORY}}/${{env.DISTRIBUTE_DIRECTORY}}/${{env.PACKAGE_DIRECTORY}}" | |
- name: Build | |
run: cmake --build "${{env.BUILD_DIRECTORY}}" --target install --config ${{env.BUILD_CONFIGURATION}} | |
- name: Put version into package.json | |
if: startsWith(github.ref, 'refs/tags/') | |
run: node ci/bump-version.js "${{ steps.get_version.outputs.VERSION }}" "${{env.PACKAGE_PATH}}" | |
env: | |
PACKAGE_PATH: "${{env.BUILD_DIRECTORY}}/${{env.DISTRIBUTE_DIRECTORY}}/${{env.PACKAGE_DIRECTORY}}" | |
- name: Cache build | |
uses: actions/cache@v3 | |
with: | |
path: ${{env.BUILD_DIRECTORY}} | |
key: ${{ runner.os }}-build-${{ github.sha }} | |
upload_debug_symbols: | |
needs: build | |
name: 'Upload debug symbols' | |
runs-on: windows-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Get build from cache | |
id: cache-check | |
uses: actions/cache@v3 | |
with: | |
path: ${{env.BUILD_DIRECTORY}} | |
key: ${{ runner.os }}-build-${{ github.sha }} | |
- name: Check cache | |
if: steps.cache-check.outputs.cache-hit != 'true' | |
run: exit 1 | |
- name: Fetch symsrv-scripts | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
repository: stream-labs/symsrv-scripts | |
path: symsrv-scripts | |
- name: Run symbol server scripts | |
run: ./symsrv-scripts/main.bat "${{ github.workspace }}/symsrv-scripts" ".\main.ps1 -localSourceDir '${{ github.workspace }}' -repo_userId 'stream-labs' -repo_name '${{env.PACKAGE_NAME}}' -repo_branch '${{ github.sha }}'" | |
env: | |
AWS_SYMB_ACCESS_KEY_ID: ${{secrets.AWS_SYMB_ACCESS_KEY_ID}} | |
AWS_SYMB_SECRET_ACCESS_KEY: ${{secrets.AWS_SYMB_SECRET_ACCESS_KEY}} | |
shell: powershell | |
upload_release_package: | |
needs: build | |
name: 'Upload release package win' | |
runs-on: windows-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
OS_TAG: "win64" | |
steps: | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Get build from cache | |
id: cache-check | |
uses: actions/cache@v3 | |
with: | |
path: ${{env.BUILD_DIRECTORY}} | |
key: ${{ runner.os }}-build-${{ github.sha }} | |
- name: Check cache | |
if: steps.cache-check.outputs.cache-hit != 'true' | |
run: exit 1 | |
- name: Tar artifact for deployment | |
run: tar -cvzf ${{env.TARGET_ARTIFACT}}.tar.gz -C ${{env.INSTALL_DISTRIBUTE_PATH}} ${{env.PACKAGE_DIRECTORY}} | |
env: | |
TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-${{env.OS_TAG}} | |
INSTALL_DISTRIBUTE_PATH: "${{env.BUILD_DIRECTORY}}/${{env.DISTRIBUTE_DIRECTORY}}" | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}} | |
aws-secret-access-key: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}} | |
aws-region: us-west-2 | |
- name: Deploy | |
run: aws s3 cp ${{env.TARGET_ARTIFACT}}.tar.gz s3://${{env.RELEASE_BUCKET}} --acl public-read | |
env: | |
TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-${{env.OS_TAG}} | |
build_macos: | |
name: 'Build a package MacOS' | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: ['x86_64', 'arm64'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Show GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache --check-cache | |
- name: Build | |
run: './ci/build-osx.sh' | |
env: | |
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}} | |
ARCHITECTURE: ${{matrix.arch}} | |
- name: Put version into package.json | |
if: startsWith(github.ref, 'refs/tags/') | |
run: node ./ci/bump-version.js "${{ steps.get_version.outputs.VERSION }}" "${{env.PACKAGE_PATH}}" | |
env: | |
PACKAGE_PATH: "${{env.BUILD_DIRECTORY}}/${{env.DISTRIBUTE_DIRECTORY}}/${{env.PACKAGE_DIRECTORY}}" | |
- name: Cache build | |
uses: actions/cache@v3 | |
with: | |
path: ${{env.BUILD_DIRECTORY}} | |
key: ${{ runner.os }}-${{ matrix.arch }}-build-${{ github.sha }} | |
upload_release_package_macos: | |
needs: build_macos | |
name: 'Upload release package macos' | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: ['x86_64', 'arm64'] | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
OS_TAG: "osx" | |
steps: | |
- name: Get the version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Get build from cache | |
id: cache-check | |
uses: actions/cache@v3 | |
with: | |
path: ${{env.BUILD_DIRECTORY}} | |
key: ${{ runner.os }}-${{ matrix.arch }}-build-${{ github.sha }} | |
- name: Check cache | |
if: steps.cache-check.outputs.cache-hit != 'true' | |
run: exit 1 | |
- name: Tar artifact for deployment | |
run: tar -cvzf ${{env.TARGET_ARTIFACT}}.tar.gz -C "${{env.INSTALL_DISTRIBUTE_PATH}}" ${{env.PACKAGE_DIRECTORY}} | |
env: | |
TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-${{env.OS_TAG}}-${{ matrix.arch }} | |
INSTALL_DISTRIBUTE_PATH: "${{env.BUILD_DIRECTORY}}/${{env.DISTRIBUTE_DIRECTORY}}" | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}} | |
aws-secret-access-key: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}} | |
aws-region: us-west-2 | |
- name: Deploy | |
run: aws s3 cp ${{env.TARGET_ARTIFACT}}.tar.gz s3://${{env.RELEASE_BUCKET}} --acl public-read | |
env: | |
TARGET_ARTIFACT: ${{env.PACKAGE_NAME}}-${{ steps.get_version.outputs.VERSION }}-${{env.OS_TAG}}-${{ matrix.arch }} |