forked from cameronjust/TA-base64
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.46 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
name: Build Splunk app
on:
push:
tags:
- 'v*'
branches:
- main
jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
with:
# Full clone incase we run things like 'git describe'.
# See https://github.com/actions/checkout/issues/338
fetch-depth: 0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install 'ksconf>=0.10,<0.11'
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Base64 Add-On for Splunk package build
id: buildpkg
run: |
set -x
echo "Build number ${{ github.run_id }}"
./build.py
set +x
echo "path=$(cat .release_path)" >> $GITHUB_OUTPUT
echo "name=$(cat .release_name)" >> $GITHUB_OUTPUT
- name: Create release and upload GitHub artifact
uses: softprops/action-gh-release@v1
if: contains(github.ref, 'tags/v')
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: ${{ steps.buildpkg.outputs.path }}