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 of cynthiaweb-mini | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.os }} ${{ matrix.arch }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu | |
| runner: ubuntu-latest | |
| arch: x64 | |
| ext: "" | |
| bin_name: cynthiaweb-mini-linux-x64 | |
| - os: ubuntu | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| ext: "" | |
| bin_name: cynthiaweb-mini-linux-arm64 | |
| - os: windows | |
| runner: windows-latest | |
| arch: x64 | |
| ext: ".exe" | |
| bin_name: cynthiaweb-mini-windows-x64.exe | |
| - os: windows | |
| runner: windows-latest | |
| arch: arm64 | |
| ext: ".exe" | |
| bin_name: cynthiaweb-mini-windows-arm64.exe | |
| - os: macos | |
| runner: macos-latest | |
| arch: arm64 | |
| ext: "" | |
| bin_name: cynthiaweb-mini-macos-arm | |
| - os: macos | |
| runner: macos-13 | |
| arch: intel | |
| ext: "" | |
| bin_name: cynthiaweb-mini-macos-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: gleam-lang/setup-gleam@v1.0.2 | |
| if: runner.os != 'windows' | |
| with: | |
| gleam-version: "1.9.1" | |
| - uses: winpax/scoop-setup@v1.0.0 | |
| if: runner.os == 'windows' | |
| - name: Install Gleam on Windows | |
| if: runner.os == 'windows' | |
| run: | | |
| scoop install gleam | |
| - name: Build and bundle | |
| run: | | |
| bun install | |
| bun bundle | |
| bun build --compile dist/cynthia_websites_mini_server.js --outfile ./${{ matrix.bin_name }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.bin_name }} | |
| path: ./${{ matrix.bin_name }} | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| release_name: Release ${{ github.ref_name }} | |
| body: | | |
| ## Release ${{ github.ref_name }} | |
| This is a new release of Cynthia Mini Website Engine. | |
| ### Installing Cynthia Mini | |
| There are two officially supported methods of installing Cynthia Mini. | |
| #### With Bun (recommended method) | |
| If you have [Bun](https://bun.sh/) installed, you can install Cynthia Mini by just running: | |
| ```sh | |
| bun install -g @cynthiaweb/cynthiaweb-mini@${{ github.ref_name }} | |
| ``` | |
| Note: All releases, including pre-releases, are tagged `latest` on the npm registry. Use a specific version tag if you want to install. | |
| This installs this release from NPM. | |
| #### With binary installer script (installs the binaries found below) | |
| If you prefer not to use Bun, or can't use it to install, you can also use these binary install scripts: | |
| ##### For Linux and MacOS | |
| ```bash | |
| curl -fsSL https://cynthiawebsiteengine.github.io/Mini-docs/assets/install.sh | bash | |
| ``` | |
| ##### For Windows | |
| ```powershell | |
| powershell -c "irm https://cynthiawebsiteengine.github.io/Mini-docs/assets/install.ps1 | iex" | |
| ``` | |
| This removes the need for Bun, but the cynthiaweb-mini CLI will be quite a big bigger in file size. | |
| *You can obviously also install it manually by downloading the binaries below.* | |
| See <https://cynthiawebsiteengine.github.io/Mini-docs/#/install> for more information. | |
| draft: false | |
| prerelease: false | |
| - name: Upload Release Assets | |
| run: | | |
| for file in ./artifacts/**/cynthiaweb-mini*; do | |
| gh release upload "${{ github.ref_name }}" "$file" | |
| done | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |