Repository navigation
89 lines (69 loc) · 2.32 KB
/
Copy pathmain.yml
File metadata and controls
89 lines (69 loc) · 2.32 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Main
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Setup dotnet
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
- name: Restore tools
run: dotnet tool restore
- name: Restore solution
run: dotnet restore
- name: Install node_modules
run: bun install --frozen-lockfile
- name: Check formatting
run: bun run fmt:check
- name: Lint
run: bun run lint
- name: Test plugin
run: bun run test:plugin
- name: Test daemon
run: bun run test:daemon
- name: Build daemon
run: bun run build:daemon
- name: Build docs
run: dotnet fsdocs build --noapidocs --projects "$(pwd)/packages/vite-plugin-fable/Fable.Daemon/Fable.Daemon.fsproj"
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: ./output
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
# A push to main that lands a new version in CHANGELOG.md is what starts a release. The check is
# cheap and says so out loud on every push, so nothing has to be remembered at merge time.
release-detect:
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
actions: write # dispatch release.yml
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Install node_modules
run: bun install --frozen-lockfile --ignore-scripts
- name: Detect a new release
env:
GH_TOKEN: ${{ github.token }}
run: bun run release:detect