chore: add LICENSE file with copyright and usage permissions #71
This file contains hidden or 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 & Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 22.x | |
| - name: Get npm cache directory | |
| id: npm-cache-dir | |
| shell: bash | |
| run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
| - uses: actions/cache@v4 | |
| id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | |
| with: | |
| path: ${{ steps.npm-cache-dir.outputs.dir }} | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install | |
| run: npm ci | |
| - name: lint | |
| run: npm run lint | |
| build: | |
| needs: lint | |
| name: Build (${{ matrix.os }} - ${{ matrix.arch }}) | |
| # if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # Build for supported platforms | |
| # https://github.com/electron/electron-packager/blob/ebcbd439ff3e0f6f92fa880ff28a8670a9bcf2ab/src/targets.js#L9 | |
| # 32-bit Linux unsupported as of 2019: https://www.electronjs.org/blog/linux-32bit-support | |
| os: [macOS-latest, windows-latest, ubuntu-latest] | |
| arch: [x64, arm64] | |
| # Publishing artifacts for multiple Windows architectures has | |
| # a bug which can cause the wrong architecture to be downloaded | |
| # for an update, so until that is fixed, only build Windows x64 | |
| exclude: | |
| - os: ubuntu-latest | |
| arch: arm64 | |
| - os: windows-latest | |
| arch: arm64 | |
| - os: windows-latest | |
| arch: ia32 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 22.x | |
| - name: Get npm cache directory | |
| id: npm-cache-dir | |
| shell: bash | |
| run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
| - uses: actions/cache@v4 | |
| id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | |
| with: | |
| path: ${{ steps.npm-cache-dir.outputs.dir }} | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Set MacOS signing certs | |
| if: matrix.os == 'macOS-latest' | |
| run: chmod +x tools/add-macos-cert.sh && ./tools/add-macos-cert.sh | |
| env: | |
| MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }} | |
| MACOS_CERT_PASSWORD: ${{ secrets.MACOS_CERT_PASSWORD }} | |
| - name: Install Windows dependencies | |
| if: matrix.os == 'windows-latest' | |
| run: "nuget install Microsoft.Windows.SDK.BuildTools -Version 10.0.26100.1742 -x ; nuget install Microsoft.Trusted.Signing.Client -Version 1.0.60 -x" | |
| shell: pwsh | |
| - name: Install | |
| run: npm ci | |
| - name: Make | |
| # if: startsWith(github.ref, 'refs/tags/') | |
| run: npm run make -- --arch=${{ matrix.arch }} | |
| shell: "bash" | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
| AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
| AZURE_CODE_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_CODE_SIGNING_ACCOUNT_NAME }} | |
| AZURE_CODE_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_CODE_SIGNING_CERTIFICATE_PROFILE_NAME }} | |
| DEBUG: "*" | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} | |
| with: | |
| draft: true | |
| files: | | |
| out/**/*.deb | |
| out/**/*.dmg | |
| out/**/*setup*.exe | |
| out/**/*.rpm | |
| out/**/*.zip |