Publish #158
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: Publish | |
on: workflow_dispatch | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: sudo apt-get install xvfb | |
- run: yarn config set network-timeout 600000 -g | |
- run: yarn | |
- run: yarn lint | |
- run: yarn compile | |
- run: yarn test | |
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' yarn wdio | |
build: | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: node ./buildcfg/check-publish.js | |
- name: write FORNO_API_KEY | |
uses: "DamianReeves/write-file-action@master" | |
with: | |
path: ./src/lib/forno.key.json | |
write-mode: overwrite | |
contents: | | |
{"API_KEY": "${{ secrets.FORNO_API_KEY }}"} | |
- run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev | |
if: runner.os == 'Linux' | |
- run: brew install python-setuptools | |
if: runner.os == 'macOS' | |
- run: yarn config set network-timeout 600000 -g | |
- run: yarn | |
- run: yarn compile | |
- run: yarn build --mac --publish always | |
if: runner.os == 'macOS' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CSC_LINK: ${{ secrets.OSX_CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.OSX_CSC_KEY_PASSWORD }} | |
OSX_NOTARIZE: "TRUE" | |
OSX_APPLE_ID: ${{ secrets.OSX_APPLE_ID }} | |
OSX_APPLE_ID_PASSWORD: ${{ secrets.OSX_APPLE_ID_PASSWORD }} | |
# download 'SSLcom/esigner-codesign' to a folder called 'esigner-codesign' in the root of the project | |
- name: Checkout esigner-codesign repository (Windows) | |
if: runner.os == 'windows' | |
uses: actions/checkout@v3 | |
with: | |
repository: 'SSLcom/esigner-codesign' | |
path: esigner-codesign | |
- run: yarn build --win --publish always | |
if: runner.os == 'Windows' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CODE_SIGN_SCRIPT_PATH: "${{ github.workspace }}/esigner-codesign/dist/index.js" | |
CODE_SIGN_SSLCOM_USERNAME: ${{ secrets.SSLCOM_USERNAME }} | |
CODE_SIGN_SSLCOM_PASSWORD: ${{ secrets.SSLCOM_PASSWORD }} | |
CODE_SIGN_SSLCOM_TOTP_SECRET: ${{ secrets.SSLCOM_TOTP_SECRET }} | |
CODE_SIGN_SSLCOM_CREDENTIAL_ID: ${{ secrets.SSLCOM_CREDENTIAL_ID }} | |
- run: yarn build --linux --publish always | |
if: runner.os == 'Linux' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: node ./buildcfg/finish-publish.js |