67
67
68
68
debian-publish :
69
69
needs : debian-build
70
+ strategy :
71
+ matrix :
72
+ architecture : [arm64, amd64]
70
73
runs-on : ubuntu-latest
71
74
72
75
steps :
76
79
path : " app"
77
80
78
81
- name : Extract variables
82
+ env :
83
+ ARCHITECTURE : ${{ matrix.architecture }}
79
84
run : |
80
85
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
86
+ echo "ARCHITECTURE=${ARCHITECTURE}" >> $GITHUB_ENV
81
87
82
88
# Get the tag's commit message
83
89
cd app/
@@ -91,22 +97,22 @@ jobs:
91
97
92
98
- name : Create folder structure for amd64 distribution
93
99
run : |
94
- mkdir gitmastery-${VERSION}-amd64
100
+ mkdir gitmastery-${VERSION}-${ARCHITECTURE}
95
101
96
- - name : Download amd64 binaries from artifacts
102
+ - name : Download ${{ matrix.architecture }} binaries from artifacts
97
103
uses : actions/download-artifact@v4
98
104
with :
99
- name : gitmastery-${{ env.VERSION }}-linux-amd64
100
- path : gitmastery-${{ env.VERSION }}-amd64 /
105
+ name : gitmastery-${{ env.VERSION }}-linux-${ARCHITECTURE}
106
+ path : gitmastery-${{ env.VERSION }}-${ARCHITECTURE} /
101
107
102
108
- name : Create upstream tarball .orig.tar.gz
103
109
run : |
104
110
# Create .orig.tar.gz file
105
- tar -czf gitmastery_${VERSION}.orig.tar.gz gitmastery-${VERSION}-amd64 /gitmastery-${VERSION}-linux-amd64
111
+ tar -czf gitmastery_${VERSION}.orig.tar.gz gitmastery-${VERSION}-${ARCHITECTURE} /gitmastery-${VERSION}-linux-${ARCHITECTURE}
106
112
tree
107
113
108
114
- name : Generate Debian packaging files
109
- working-directory : gitmastery-${{ env.VERSION }}-amd64
115
+ working-directory : gitmastery-${{ env.VERSION }}-${{ matrix.architecture }}
110
116
# TODO: Update to something agnostic
111
117
env :
112
118
EMAIL : woojiahao1234@gmail.com
@@ -129,7 +135,7 @@ jobs:
129
135
Build-Depends: debhelper-compat (= 13)
130
136
131
137
Package: gitmastery
132
- Architecture: amd64
138
+ Architecture: ${ARCHITECTURE}
133
139
Depends: ${shlibs:Depends}, ${misc:Depends}
134
140
Description: execute Git-Mastery
135
141
gitmastery is a Git learning tool built by the National University of Singapore School of Computing
@@ -150,7 +156,7 @@ jobs:
150
156
\tdh \$@
151
157
\n
152
158
override_dh_auto_install:
153
- \tinstall -D -m 0755 gitmastery-${VERSION}-linux-amd64 build/usr/bin/gitmastery
159
+ \tinstall -D -m 0755 gitmastery-${VERSION}-linux-${ARCHITECTURE} build/usr/bin/gitmastery
154
160
""" > debian/rules
155
161
156
162
echo """usr/bin
@@ -164,17 +170,6 @@ jobs:
164
170
- name : Logging
165
171
run : |
166
172
tree
167
- cat gitmastery-${VERSION}/debian/changelog
168
- cat gitmastery-${VERSION}/debian/control
169
- cat gitmastery-${VERSION}/debian/copyright
170
- cat gitmastery-${VERSION}/debian/source/format
171
- cat gitmastery-${VERSION}/debian/rules
172
-
173
- # - name: Download arm64 binaries from artifacts
174
- # uses: actions/download-artifact@v4
175
- # with:
176
- # name: gitmastery-${{ env.VERSION }}-linux-arm64
177
- # path: gitmastery-${{ env.VERSION }}/gitmastery-${{ env.VERSION }}-linux-arm64
178
173
179
174
windows :
180
175
runs-on : windows-latest
0 commit comments