-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (53 loc) · 1.7 KB
/
continuous-integration.yml
File metadata and controls
65 lines (53 loc) · 1.7 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
name: Create Release
on:
push:
branches:
- master
jobs:
create_release:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
- name: Install Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
- name: Upgrade python pip
run: python -m pip install --upgrade pip
- name: Install git
run: pip install gitpython
- name: Install semver
run: pip install semver
- name: Set SPEC_VERSION env var
run: echo ::set-env name=SPEC_VERSION::$(python scripts/calculate_version.py)
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Create release (master only)
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.SPEC_VERSION }}
release_name: ${{ env.SPEC_VERSION }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install dependencies
run: make install-node
- name: Run publish
run: make publish
- name: Upload documentation asset to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: build/nrl-consumer-api.json
asset_name: nrl-consumer-api.json
asset_content_type: application/json