-
Notifications
You must be signed in to change notification settings - Fork 154
113 lines (102 loc) · 3.55 KB
/
publish-linux-packages.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
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
name: Publish Linux Packages
on:
workflow_call:
inputs:
ziti-version:
description: generated by ziti-ci
type: string
required: true
jobs:
publish-linux-packages:
name: ${{ matrix.package_name }} ${{ matrix.arch.gox }} ${{ matrix.packager }}
runs-on: ubuntu-latest
strategy:
matrix:
package_name:
- openziti
- openziti-controller
- openziti-router
arch:
- goreleaser: amd64
gox: amd64
deb: amd64
rpm: x86_64
- goreleaser: arm64
gox: arm64
deb: arm64
rpm: aarch64
- goreleaser: armv7
gox: arm
deb: armv7
rpm: armv7
packager:
- rpm
- deb
# - archlinux # (pacman)
# - apk
env:
ZITI_VERSION: ${{ inputs.ziti-version || github.event.inputs.ziti-version }}
ZITI_MAINTAINER: "OpenZiti Maintainers <[email protected]>"
ZITI_HOMEPAGE: "https://openziti.io"
ZITI_VENDOR: "NetFoundry Inc."
GOARCH: ${{ matrix.arch.goreleaser }}
MINIMUM_SYSTEMD_VERSION: 232
ZITI_DEB_TEST_REPO: ${{ vars.ZITI_DEB_TEST_REPO || 'zitipax-openziti-deb-test' }}
ZITI_RPM_TEST_REPO: ${{ vars.ZITI_RPM_TEST_REPO || 'zitipax-openziti-rpm-test' }}
NFPM_VERSION: "2.38.0"
steps:
- name: Checkout Workspace
uses: actions/checkout@v4
- name: Download Linux Release Artifacts
uses: actions/download-artifact@v4
with:
name: linux-release-${{ github.run_id }}
path: release/
- name: Move Release Artifact for Architecture to Predictable Location for nfpm
shell: bash
run: |
mv -v ./release/${{ matrix.arch.gox }}/linux/ziti \
./release/ziti
- name: Build Package
id: nfpm
uses: burningalchemist/action-gh-nfpm@eeac96f42da23d091eec0d0088bf05cac0ceb9f3
# uses: netfoundry/action-gh-nfpm@main
with:
nfpm_version: ${{ env.NFPM_VERSION }}
packager: ${{ matrix.packager }}
config: dist/dist-packages/linux/nfpm-${{ matrix.package_name }}.yaml
target: release/
- name: get the package name from the output
run: echo ${{ steps.nfpm.outputs.package }}
shell: bash
- run: ls -lh release/
shell: bash
- name: upload package artifact to build summary page
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package_name }}-${{ matrix.arch.gox }}-${{ matrix.packager }}
path: ./release/${{ matrix.package_name }}*.${{ matrix.packager }}
if-no-files-found: error
- name: Configure jFrog CLI
uses: jfrog/setup-jfrog-cli@v4
env:
JF_ENV_1: ${{ secrets.ZITI_ARTIFACTORY_CLI_CONFIG_PACKAGE_UPLOAD }}
- name: Upload RPM to Artifactory testing repo
if: matrix.packager == 'rpm'
shell: bash
run: >
jf rt upload
./release/${{ matrix.package_name }}*.rpm
${{ env.ZITI_RPM_TEST_REPO }}/redhat/${{ matrix.arch.rpm }}/
--recursive=false
--flat=true
- name: Upload DEB to Artifactory testing repo
if: matrix.packager == 'deb'
shell: bash
run: >
jf rt upload
./release/${{ matrix.package_name }}*.deb
${{ env.ZITI_DEB_TEST_REPO }}/pool/${{ matrix.package_name }}/${{ matrix.arch.deb }}/
--deb=debian/main/${{ matrix.arch.deb }}
--recursive=false
--flat=true