forked from OVAL-Community/OVAL
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 975 Bytes
/
buildRelease.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
name: Build Release
on:
release:
types: [ published, edited ]
jobs:
buildRelease:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Release Artifacts
env:
TAG: ${{ github.ref_name }}
run: |
VERSION=$(echo $TAG | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
echo "Build OVAL Version ${VERSION}"
make OVAL_VERSION=${VERSION}
- name: Attach Release Artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
TAG: ${{ github.ref_name }}
run: |
VERSION=$(echo $TAG | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
gh release upload $TAG schemas-${VERSION}.zip oval_docs-${VERSION}.zip --clobber --repo $OWNER/$REPO