-
-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (43 loc) · 1.28 KB
/
guide-links.yml
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
name: Guide Links CI
on:
push:
tags:
- v*
jobs:
pot:
name: Create guide links
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20 ]
steps:
- name: '[setup] Checkout Project'
uses: actions/checkout@v4
- name: '[setup] Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: '[app] Install'
run: |
npm ci
- name: '[app] Create Guide Links'
run: |
npm run guide-links
- name: '[release] Check Prerelease'
id: check_prerelease
run: |
GITHUB_TAG=`echo $GITHUB_REF | cut -d/ -f3`
if [[ $GITHUB_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
else
echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
fi
- name: '[release] Create & Upload Artifacts'
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "guide-links.json"
artifactContentType: application/json
prerelease: ${{ steps.check_prerelease.outputs.is_prerelease }}
replacesArtifacts: true