-
-
Notifications
You must be signed in to change notification settings - Fork 14
86 lines (76 loc) · 2.58 KB
/
release.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
name: Creating Release of latest AirConnect binaries
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: write
discussions: write
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
deployments: write
contents: write
statuses: write
actions: read
steps:
- uses: actions/[email protected]
with:
path: "."
- name: Get latest AirConnect release
id: get_release
uses: robinraju/[email protected]
with:
repository: "philippe44/AirConnect"
latest: true
tarBall: false
zipBall: false
fileName: "AirConnect*.zip"
out-file-path: "src/dsm7/bin"
extract: true
- name: Validate downloaded Release
id: validate_release
run: |
RELEASE_VERSION=${{ steps.get_release.outputs.tag_name }}
RELEASE_FILES=${{ fromJson(steps.get_release.outputs.downloaded_files)[0] }}
echo "Using AirConnect version '${RELEASE_VERSION}'"
echo "Using downloaded file: '${RELEASE_FILES}'"
ls -ltR "${GITHUB_WORKSPACE}"/src/dsm7/bin/
- name: Running shellcheck
id: validate_code
run: cd "${GITHUB_WORKSPACE}"/src/dsm7; make shellcheck
- name: Test packaging of x86_64 architecture
id: test_packaging
run: cd "${GITHUB_WORKSPACE}"/src/dsm7; RELEASE_VERSION=${{ steps.get_release.outputs.tag_name }} ARCH=x86_64 make build
- name: Create packages of ALL architectures
id: create_packages
run: cd "${GITHUB_WORKSPACE}"/src/dsm7; RELEASE_VERSION=${{ steps.get_release.outputs.tag_name }} make build-all
- name: Cleanup target
id: clean_target
run: cd "${GITHUB_WORKSPACE}"/src/dsm7; make clean
- name: Validate created packages (dist)
id: validate_created_packages
run: ls -ltR "${GITHUB_WORKSPACE}"/src/dsm7/dist/
- name: Creating GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: |
src/dsm7/dist/*.spk
discussion_category_name: Releases
generate_release_notes: true
if: startsWith(github.ref, 'refs/tags/')
- name: Upload releases to artifacts
id: upload_releases
uses: actions/upload-artifact@v4
with:
name: releases
path: src/dsm7/dist/
if-no-files-found: error
retention-days: 7
- name: Cleanup dist
id: clean_dist
run: cd "${GITHUB_WORKSPACE}"/src/dsm7; make clean-dist