-
Notifications
You must be signed in to change notification settings - Fork 13
80 lines (68 loc) · 2.31 KB
/
artifacts.yml
File metadata and controls
80 lines (68 loc) · 2.31 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Artifacts (Package)
on:
push:
branches: [ master ]
tags: [ v* ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build-artifacts:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Prepare environment (none-tag)
if: github.ref_type != 'tag'
run: |
export VERSION="${GITHUB_REF##*/}-${GITHUB_SHA::7}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "ARTIFACT=build/nvidia-libs-${VERSION}" >> $GITHUB_ENV
- name: Prepare environment (tag)
if: github.ref_type == 'tag'
run: |
export VERSION=$(git describe --always --tags --dirty=+)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "ARTIFACT=build/nvidia-libs-${VERSION}" >> $GITHUB_ENV
- name: Setup problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Build (default)
uses: SveSop/ubuntu-mingw-github-action@v3
with:
command: |
./package-release.sh "${{ env.VERSION }}" build
- name: Build (fakedll)
uses: SveSop/ubuntu-mingw-github-action@v3
with:
command: |
./package-release.sh "${{ env.VERSION }}-fakedll" build --fakedll
- name: Upload artifacts (default)
uses: actions/upload-artifact@v6
with:
name: nvidia-libs-${{ env.VERSION }}
path: ${{ env.ARTIFACT }}
if-no-files-found: error
- name: Upload artifacts (fakedll)
uses: actions/upload-artifact@v6
with:
name: nvidia-libs-${{ env.VERSION }}-fakedll
path: ${{ env.ARTIFACT }}-fakedll
if-no-files-found: error
- name: Create release archives
if: github.ref_type == 'tag'
run: |
tar -cJf nvidia-libs-${{ env.VERSION }}.tar.xz -C build nvidia-libs-${{ env.VERSION }}
tar -cJf nvidia-libs-${{ env.VERSION }}-fakedll.tar.xz -C build nvidia-libs-${{ env.VERSION }}-fakedll
- name: Upload assets to Release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
files: |
nvidia-libs-${{ env.VERSION }}.tar.xz
nvidia-libs-${{ env.VERSION }}-fakedll.tar.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}