v0.16.0 #60
Workflow file for this run
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: cicd-release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| publish: | |
| name: Publish packages | |
| runs-on: ubuntu-22.04 | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=8192 | |
| permissions: | |
| packages: write | |
| steps: | |
| # Checkout the code. | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Setup node & python and build. | |
| - name: Setup & build | |
| uses: ./.github/actions/common-build | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish packages to GitHub Packages | |
| run: npx lerna publish from-package --yes | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Package vs-code extensions. | |
| run: yarn package:extensions | |
| - name: Upload vsix packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vsix-packages | |
| path: | | |
| extensions/*/*.vsix | |
| retention-days: 1 | |
| package: | |
| name: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ['ubuntu-22.04', 'windows-2025', 'macos-15-intel', 'macos-15'] # macos-15-intel for intel, macos-15 for arm | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set env variables | |
| shell: bash | |
| # We set env variables on the GITHUB_ENV variable so they value is available in all consecutive steps. | |
| run: | | |
| echo "PYTHON_VERSION=3.13" >> "$GITHUB_ENV" | |
| echo "NODE_VERSION=22.x" >> "$GITHUB_ENV" | |
| echo "GITHUB_TOKEN=${{ inputs.GITHUB_TOKEN }}" >> "$GITHUB_ENV" | |
| - name: Setup Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: '@crossmodel' | |
| cache: 'yarn' | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Build prod package | |
| shell: bash | |
| run: | | |
| yarn --skip-integrity-check --network-timeout 100000 | |
| yarn build:packages | |
| yarn theia:electron build:prod | |
| yarn theia:electron package:prod | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=4096 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 | |
| - name: Upload ${{ runner.os }} ${{ runner.arch }} installer | |
| if: runner.os == 'Windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ runner.os }}-${{ runner.arch }}-installer | |
| path: | | |
| applications/electron-app/dist/CrossModel-*.exe | |
| retention-days: 1 | |
| compression-level: 0 | |
| - name: Upload ${{ runner.os }} ${{ runner.arch }} AppImage | |
| if: runner.os == 'Linux' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ runner.os }}-${{ runner.arch }}-AppImage | |
| path: | | |
| applications/electron-app/dist/CrossModel-*.AppImage | |
| retention-days: 1 | |
| compression-level: 0 | |
| - name: Upload ${{ runner.os }} ${{ runner.arch }} Debian installer | |
| if: runner.os == 'Linux' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ runner.os }}-${{ runner.arch }}-deb-installer | |
| path: | | |
| applications/electron-app/dist/CrossModel-*.deb | |
| retention-days: 1 | |
| compression-level: 0 | |
| - name: Upload ${{ runner.os }} ${{ runner.arch }} dmg installer | |
| if: runner.os == 'macOS' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ runner.os }}-${{ runner.arch }}-dmg-installer | |
| path: | | |
| applications/electron-app/dist/CrossModel-*.dmg | |
| retention-days: 1 | |
| compression-level: 0 | |
| # Disabled zip for now, it's not being build since dmg files are working fine. | |
| # - name: Upload ${{ runner.os }} ${{ runner.arch }} zip installer | |
| # if: runner.os == 'macOS' | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ${{ runner.os }}-${{ runner.arch }}-zip-installer | |
| # path: | | |
| # applications/electron-app/dist/CrossModel-*.zip | |
| # retention-days: 1 | |
| # compression-level: 0 | |
| release: | |
| name: Create Release | |
| needs: | |
| - publish | |
| - package | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-artifacts | |
| merge-multiple: true | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| release-artifacts/**/*.* |