-
Notifications
You must be signed in to change notification settings - Fork 134
73 lines (58 loc) · 1.81 KB
/
Copy pathrelease.yml
File metadata and controls
73 lines (58 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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