update version (#1700) #185
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 and publish installer artifacts for all platforms | |
on: | |
push: | |
branches: | |
- 'develop' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
create_draft_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: read version from package.json | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
- name: check for existing release | |
run: gh release list --exclude-drafts | grep -q ".*v${{ steps.package-version.outputs.current-version }}" && exit 1 || true | |
- name: remove old draft releases | |
run: gh release list | grep -e "Draft.*v${{ steps.package-version.outputs.current-version }}" | awk '{print $3}' | xargs -r gh release delete | |
- name: create new draft release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: v${{ steps.package-version.outputs.current-version }} | |
prerelease: false | |
draft: true | |
title: ${{ steps.package-version.outputs.current-version }} | |
build_release: | |
needs: [create_draft_release] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
include: | |
- os: macos-11 | |
cert_key: APPLE_DEVELOPER_SIGNING_CERTIFICATE | |
cert_password_key: APPLE_CERTIFICATE_PASSWORD | |
apple_id_key: APPLE_ID | |
apple_app_specific_password_key: APPLE_ID_PASSWORD | |
- os: windows-latest | |
cert_key: WINDOWS_CSC_CERTIFICATE | |
cert_password_key: WINDOWS_CSC_PASSWORD | |
runs-on: ${{ matrix.os }} | |
env: | |
CSC_LINK: ${{ secrets[matrix.cert_key] }} | |
CSC_KEY_PASSWORD: ${{ secrets[matrix.cert_password_key] }} | |
APPLE_ID: ${{ secrets[matrix.apple_id_key] }} | |
APPLE_ID_PASSWORD: ${{ secrets[matrix.apple_app_specific_password_key] }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.12.1 | |
cache: 'npm' | |
- name: install Linux dev tools | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt update -y | |
sudo apt install -y libudev-dev | |
- name: create NPM config file | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ./.npmrc | |
- run: npm run setup:ci | |
- run: npm run compile | |
- run: npm run test:unit:main -- --testTimeout=5000 --verbose --detectOpenHandles --forceExit | |
- run: npm run test:unit:components | |
- run: npm run bundle | |
- name: Sleep for 4 seconds | |
shell: bash | |
run: sleep 4 | |
- run: npm run publish |