-
Notifications
You must be signed in to change notification settings - Fork 62
69 lines (58 loc) · 1.71 KB
/
build.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build and Publish Spec
on:
push:
branches:
- main
jobs:
build:
name: Build and Publish
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Build
run: npm ci && npm run merge
- name: Extract Branch Name
id: branch
shell: bash
run: echo "name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: Upload Artifacts
id: upload
uses: actions/upload-artifact@v4
with:
name: build
path: |
build/*
- name: Release Specification to GitHub
id: release
uses: marvinpinto/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: ${{ steps.branch.outputs.name }}-latest
prerelease: true
title: OpenSearch OpenAPI Spec (${{ steps.branch.outputs.name }})
files: |
LICENSE.txt
build/*
- name: Extract Changelog
id: changelog
uses: sean0x42/markdown-extract@v2
with:
file: CHANGELOG.md
pattern: Unreleased
- name: Update Release Description
id: update
uses: tubone24/[email protected]
env:
TAG_NAME: ${{ steps.branch.outputs.name }}-latest
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
${{ steps.changelog.outputs.markdown }}
### Links
- [Build Artifact](${{ steps.upload.outputs.artifact-url }})