Release 1.0.4 #32
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: | |
| - '*' | |
| # see https://docs.npmjs.com/trusted-publishers | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write # Required for release creation | |
| jobs: | |
| build-and-publish: | |
| name: Build and publish to npm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set git to use LF | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - uses: actions/checkout@v6 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Cache NPM dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }} | |
| - name: Install global NPM packages | |
| run: npm i --global purescript@0.15.15 spago@latest purs-tidy@latest esbuild@latest | |
| - name: Cache PureScript dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }} | |
| path: | | |
| .spago | |
| output | |
| - name: Install NPM dependencies | |
| run: npm ci | |
| - name: Install PureScript dependencies | |
| run: spago install | |
| - name: Build project | |
| run: spago build | |
| - name: Bundle executables | |
| run: | | |
| node ./bin/index.dev.js bundle -p spago-bin | |
| node ./bin/bundle.js bundle -p docs-search-client-halogen | |
| - name: Run tests | |
| run: node --no-warnings=ExperimentalWarning ./bin/bundle.js test | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: false | |
| prerelease: false | |
| make_latest: true | |
| - name: Publish to npm | |
| run: npm publish --access public |