feat: add markdown syntax highlighting to TUI preview #14
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-14 | |
| target: darwin-arm64 | |
| - os: ubuntu-latest | |
| target: linux-x64 | |
| - os: ubuntu-24.04-arm | |
| target: linux-arm64 | |
| - os: windows-latest | |
| target: windows-x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build binary | |
| run: bun run scripts/build-binaries.ts --target ${{ matrix.target }} | |
| - name: Test binary (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| tar -xzf packages/openmemo-${{ matrix.target }}/openmemo-${{ matrix.target }}.tar.gz -C packages/openmemo-${{ matrix.target }} | |
| ./packages/openmemo-${{ matrix.target }}/openmemo-${{ matrix.target }} help | |
| - name: Test binary (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| Expand-Archive -Path packages/openmemo-${{ matrix.target }}/openmemo-${{ matrix.target }}.zip -DestinationPath packages/openmemo-${{ matrix.target }} -Force | |
| ./packages/openmemo-${{ matrix.target }}/openmemo-${{ matrix.target }}.exe help | |
| - name: Upload artifact (Unix) | |
| if: runner.os != 'Windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: openmemo-${{ matrix.target }} | |
| path: packages/openmemo-${{ matrix.target }}/*.tar.gz | |
| if-no-files-found: error | |
| - name: Upload artifact (Windows) | |
| if: runner.os == 'Windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: openmemo-${{ matrix.target }} | |
| path: packages/openmemo-${{ matrix.target }}/*.zip | |
| if-no-files-found: error | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Get version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Update package version | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| cd packages/openmemo | |
| npm version $VERSION --no-git-tag-version --allow-same-version | |
| - name: Publish main package | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| cd packages/openmemo | |
| npm publish --access public | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| artifacts/openmemo-darwin-arm64/* | |
| artifacts/openmemo-linux-x64/* | |
| artifacts/openmemo-linux-arm64/* | |
| artifacts/openmemo-windows-x64/* | |
| generate_release_notes: true |