Dash - Fix ESLint errors #21
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: "CronitorCLI Release" | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| release: | |
| name: Create Draft Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref }} | |
| # Currently we can't upload to a draft release so we are forced into this nonsense | |
| release_name: Draft Release ${{ github.ref }} | |
| draft: false | |
| prerelease: false | |
| build-binaries: | |
| name: Create build assets | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 2 | |
| matrix: | |
| goos: [linux, windows, darwin, freebsd] | |
| goarch: [amd64, arm, arm64] | |
| exclude: | |
| - goarch: arm | |
| goos: darwin | |
| - goarch: 386 | |
| goos: darwin | |
| - goarch: arm | |
| goos: windows | |
| - goarch: arm64 | |
| goos: windows | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install web dependencies | |
| run: | | |
| cd web | |
| npm install | |
| - name: Ensure static directory exists | |
| run: | | |
| mkdir -p web/static | |
| ls -la web/ | |
| - name: Build web assets | |
| run: | | |
| cd web | |
| echo "Starting web build..." | |
| npm run build | |
| echo "Web build completed" | |
| - name: Verify web assets were built | |
| run: | | |
| ls -la web/static/ | |
| if [ ! -f "web/static/index.html" ]; then | |
| echo "Warning: web/static/index.html not found, creating minimal fallback" | |
| echo "<html><body>Build fallback</body></html>" > web/static/index.html | |
| fi | |
| # Ensure there's at least one file for Go embed | |
| if [ -z "$(ls -A web/static/)" ]; then | |
| echo "Error: web/static directory is empty" | |
| echo "placeholder" > web/static/.placeholder | |
| fi | |
| echo "Web assets verified successfully" | |
| - name: Go Release Binaries Normal Volume Size | |
| uses: wangyoucao577/[email protected] | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| goos: ${{ matrix.goos }} | |
| goarch: ${{ matrix.goarch }} | |
| asset_name: ${{ matrix.goos }}_${{ matrix.goarch }} | |
| goversion: 1.23.4 | |
| binary_name: cronitor | |
| sha256sum: true | |
| overwrite: true | |
| pre_command: export CGO_ENABLED=0 | |
| publish: | |
| name: Mark build complete | |
| runs-on: ubuntu-latest | |
| needs: [build-binaries] | |
| steps: | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| - name: Update release | |
| uses: tubone24/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| release_name: Release ${{ steps.get_version.outputs.VERSION }} |