Update README, Change available models #8
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ 'v*' ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| release_tag: | |
| description: 'Tag to use for the release (e.g. v1.0.0)' | |
| required: false | |
| release_name: | |
| description: 'Release title (optional)' | |
| required: false | |
| release_body: | |
| description: 'Release notes (optional)' | |
| required: false | |
| draft: | |
| description: 'Create release as draft (true/false)' | |
| required: false | |
| default: 'false' | |
| prerelease: | |
| description: 'Mark as prerelease (true/false)' | |
| required: false | |
| default: 'false' | |
| jobs: | |
| build: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build TypeScript | |
| run: npm run build | |
| - name: Build & Release (Windows) | |
| if: runner.os == 'Windows' | |
| run: npm run package:win -- -p always | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build & Release (macOS) | |
| if: runner.os == 'macOS' | |
| run: npm run package:mac -- -p always | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build & Release (Linux) | |
| if: runner.os == 'Linux' | |
| run: npm run package:linux -- -p always | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: OctoBrowser-${{ runner.os }} | |
| path: | | |
| release/*.exe | |
| release/*.dmg | |
| release/*.AppImage | |
| publish: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '') | |
| steps: | |
| - name: Download Windows artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: OctoBrowser-Windows | |
| path: artifacts/windows | |
| - name: Download macOS artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: OctoBrowser-macOS | |
| path: artifacts/macos | |
| - name: Download Linux artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: OctoBrowser-Linux | |
| path: artifacts/linux | |
| - name: Create GitHub Release and upload assets | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag || github.ref_name }} | |
| name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release_name || github.ref_name }} | |
| body: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release_body || 'Release created by CI' }} | |
| draft: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.draft || 'false' }} | |
| prerelease: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.prerelease || 'false' }} | |
| files: | | |
| artifacts/windows/*.exe | |
| artifacts/macos/*.dmg | |
| artifacts/linux/*.AppImage | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |