-
Notifications
You must be signed in to change notification settings - Fork 31
138 lines (135 loc) · 5.42 KB
/
Copy pathrelease.yml
File metadata and controls
138 lines (135 loc) · 5.42 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Release
on:
push:
tags:
- v*
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: "release-${{ github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
build:
uses: ./.github/workflows/build.yml
permissions:
packages: write
contents: read
documentation:
permissions: write-all
uses: ./.github/workflows/documentation.yml
release:
name: Create Release
permissions: write-all
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Download artifacts for ankaios-linux-amd64-bin
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ankaios-linux-amd64-bin
path: dist/linux-amd64/bin
- name: Download artifacts for ankaios-linux-arm64-bin
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ankaios-linux-arm64-bin
path: dist/linux-arm64/bin
- name: Download artifacts for requirement-tracing-report
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: requirement-tracing-report
path: dist/
- name: Download artifacts for code-coverage
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: code-coverage
path: dist/coverage
- name: Download license report
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: licenses
path: dist/
- name: Download unit test results
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: unit-test-results
path: dist/test-results
- name: Download robot test results
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: robot-tests-result
path: dist/test-results/robot
- name: Download man pages
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: man-pages
path: dist/
- name: Download vendored source
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: vendored-sources
path: dist/
- name: Package release artifacts
run: tools/create_release.sh
- name: Upload release artifacts
run: |
cd dist
tree
gh release upload ${{ github.ref_name }} \
coverage-report.tar.gz \
coverage-report.zip \
test-results.tar.gz \
test-results.zip \
req_tracing_report.html \
install.sh \
ank_base.proto \
control_api.proto \
ankaios_configs.tar.gz \
man-pages.tar.gz \
linux-amd64/ankaios-linux-amd64.tar.gz \
linux-amd64/ankaios-linux-amd64.tar.gz.sha512sum.txt \
linux-arm64/ankaios-linux-arm64.tar.gz \
linux-arm64/ankaios-linux-arm64.tar.gz.sha512sum.txt \
licenses.html \
ankaios-vendored-source*.tar.gz
- name: Collect quality artifacts
id: collect_quality_artifacts
uses: eclipse-dash/quevee@b62d7faa1cf68654758754aaed8616b19f227583 # v1.0.0
with:
release_url: "https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
artifacts_requirements: "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/req_tracing_report.html"
artifacts_testing: "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/test-results.zip,https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/test-results.tar.gz"
artifacts_documentation: "https://eclipse-ankaios.github.io/ankaios"
artifacts_coding_guidelines: "https://eclipse-ankaios.github.io/ankaios/latest/development/rust-coding-guidelines/"
artifacts_release_process: "https://eclipse-ankaios.github.io/ankaios/latest/development/ci-cd-release/"
- name: Upload quality manifest
run: |
gh release upload ${{ github.ref_name }} ${{ steps.collect_quality_artifacts.outputs.manifest_file }}
debian-packages:
name: Build and publish Debian packages
needs: release
if: ${{ !contains(github.ref_name, '-') }}
permissions:
contents: read
uses: ./.github/workflows/debian_build.yml
secrets: inherit
upload-debian-source:
name: Upload Debian source package to release
needs: debian-packages
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Download Debian source package
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: debian-source-package
path: dist/src/
- name: Upload Debian source package to release
run: |
tar -czf ankaios-debian-source-${{ github.ref_name }}.tar.gz -C dist/src .
gh release upload ${{ github.ref_name }} ankaios-debian-source-${{ github.ref_name }}.tar.gz
env:
GH_TOKEN: ${{ github.token }}