|
18 | 18 | type: string |
19 | 19 |
|
20 | 20 | jobs: |
21 | | - build: |
| 21 | + set-version: |
22 | 22 | if: github.repository == 'kernelkit/infix' && startsWith(github.ref, 'refs/tags/') |
23 | | - name: Build Infix ${{ github.ref_name }} [${{ matrix.target }}] |
24 | | - runs-on: [ self-hosted, release ] |
25 | | - strategy: |
26 | | - matrix: |
27 | | - target: [aarch64, x86_64] |
28 | | - fail-fast: false |
| 23 | + runs-on: ubuntu-latest |
| 24 | + outputs: |
| 25 | + version: ${{ steps.set-ver.outputs.version }} |
29 | 26 | steps: |
30 | | - - uses: actions/checkout@v4 |
31 | | - with: |
32 | | - clean: true |
33 | | - submodules: recursive |
34 | | - |
35 | | - - name: Set Release Variables |
36 | | - id: vars |
| 27 | + - id: set-ver |
37 | 28 | run: | |
38 | 29 | if [ -n "${{ inputs.version }}" ]; then |
39 | 30 | ver=${{ inputs.version }} |
40 | 31 | else |
41 | 32 | ver=${GITHUB_REF#refs/tags/} |
42 | 33 | fi |
43 | | - echo "ver=${ver}" >> $GITHUB_OUTPUT |
44 | | - fver=${ver#v} |
45 | | - target=${{ matrix.target }}-${fver} |
46 | | - echo "dir=infix-$target" >> $GITHUB_OUTPUT |
47 | | - echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT |
48 | | -
|
49 | | - - name: Restore Cache of dl/ |
50 | | - uses: actions/cache@v4 |
51 | | - with: |
52 | | - path: dl/ |
53 | | - key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }} |
54 | | - restore-keys: | |
55 | | - dl- |
56 | | -
|
57 | | - - name: Restore Cache of .ccache/ |
58 | | - uses: actions/cache@v4 |
59 | | - with: |
60 | | - path: .ccache/ |
61 | | - key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }} |
62 | | - restore-keys: | |
63 | | - ccache-${{ matrix.target }}- |
64 | | - ccache- |
65 | | -
|
66 | | - - name: Configure & Build |
67 | | - env: |
68 | | - INFIX_RELEASE: ${{ steps.vars.outputs.ver }} |
69 | | - run: | |
70 | | - target=${{ matrix.target }}_defconfig |
71 | | - echo "Building $target ..." |
72 | | - make $target |
73 | | - make |
| 34 | + echo "version=${ver}" >> $GITHUB_OUTPUT |
74 | 35 |
|
75 | | - - name: Generate SBOM from Build |
76 | | - run: | |
77 | | - make legal-info |
78 | | -
|
79 | | - - name: Build test specification |
80 | | - run: | |
81 | | - make test-spec |
82 | | -
|
83 | | - - name: Prepare Artifacts |
84 | | - run: | |
85 | | - cd output/ |
86 | | - mv images ${{ steps.vars.outputs.dir }} |
87 | | - ln -s ${{ steps.vars.outputs.dir }} images |
88 | | - tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }} |
89 | | -
|
90 | | - mv legal-info legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }} |
91 | | - tar cfz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}.tar.gz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }} |
92 | | -
|
93 | | - - uses: actions/upload-artifact@v4 |
94 | | - with: |
95 | | - name: artifact-${{ matrix.target }} |
96 | | - path: output/*.tar.gz |
97 | | - |
98 | | - - uses: actions/upload-artifact@v4 |
99 | | - with: |
100 | | - name: artifact-disk-image-${{ matrix.target }} |
101 | | - path: output/images/*.qcow2 |
| 36 | + build: |
| 37 | + needs: set-version |
| 38 | + uses: ./.github/workflows/build-release.yml |
| 39 | + with: |
| 40 | + version: ${{ needs.set-version.outputs.version }} |
| 41 | + use_cache: true |
102 | 42 |
|
103 | 43 | release: |
104 | 44 | name: Release Infix ${{ github.ref_name }} |
|
156 | 96 | run: | |
157 | 97 | awk '/^-----*$/{if (x == 1) exit; x=1;next}x' doc/ChangeLog.md \ |
158 | 98 | |head -n -1 > release.md |
| 99 | + echo "" >> release.md |
| 100 | + echo "> [!TIP]" >> release.md |
| 101 | + echo "> **Try Infix in GNS3!** Download the appliance from the [GNS3 Marketplace](https://gns3.com/marketplace/appliances/infix) to test Infix in a virtual network environment without hardware." >> release.md |
159 | 102 | cat release.md |
160 | 103 |
|
161 | 104 | - uses: ncipollo/release-action@v1 |
|
0 commit comments