-
Notifications
You must be signed in to change notification settings - Fork 1
100 lines (85 loc) · 2.89 KB
/
Copy pathgithub_release.yaml
File metadata and controls
100 lines (85 loc) · 2.89 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
90
91
92
93
94
95
96
97
98
99
100
name: Create GitHub release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+[a-c][0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-[a-c][0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+alpha[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+beta[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
permissions: {}
jobs:
create-release-draft:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- run: gh release create "${GH_REF_NAME}" --draft --title "${GH_REF_NAME}"
env:
GH_TOKEN: ${{ github.token }}
GH_REF_NAME: ${{ github.ref_name }}
build:
runs-on: ubuntu-latest
needs: create-release-draft
permissions:
contents: write
strategy:
matrix:
node-version: ['24']
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
package-manager-cache: false
- name: Install dependencies
run: npm ci
- name: Generate build artifacts
run: npm run build
- name: Generate the package
run: npm pack
- name: Extract the package
run: tar -xzf fractal-web-*.tgz
- name: Repack the package removing parent folder
env:
GH_REF_NAME: ${{ github.ref_name }}
run: tar -C package -czf "node-${{ matrix.node-version }}-fractal-web-${GH_REF_NAME}.tar.gz" build package.json node_modules LICENSE
- run: gh release upload "${GH_REF_NAME}" "node-${{ matrix.node-version }}-fractal-web-${GH_REF_NAME}.tar.gz"
env:
GH_REF_NAME: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39
with:
version: '0.11.14'
enable-cache: false
python-version: '3.12'
- run: uv sync --frozen
- name: Build Docs
run: ./build-docs.sh
- run: tar -czf docs-${GH_REF_NAME}.tar.gz site
env:
GH_REF_NAME: ${{ github.ref_name }}
- run: gh release upload "${GH_REF_NAME}" "docs-${GH_REF_NAME}.tar.gz" --clobber
env:
GH_REF_NAME: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
publish-release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- run: gh release edit "${GH_REF_NAME}" --draft=false
env:
GH_TOKEN: ${{ github.token }}
GH_REF_NAME: ${{ github.ref_name }}