Skip to content

Commit 1433677

Browse files
release wf: Adding apt arficactory upload
Signed-off-by: Simon Beaudoin <sbeaudoi@qti.qualcomm.com>
1 parent 573fe90 commit 1433677

1 file changed

Lines changed: 33 additions & 4 deletions

File tree

.github/workflows/qcom-release-reusable-workflow.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ on:
3838
secrets:
3939
TOKEN:
4040
required: true
41+
APT_TOKEN:
42+
required: true
4143

4244
permissions:
4345
contents: read
@@ -203,6 +205,17 @@ jobs:
203205
pkg-dir: package-repo
204206
build-dir: build
205207

208+
- name: Get .changes file
209+
run: |
210+
shopt -s nullglob
211+
files=(build/*.changes)
212+
if (( ${#files[@]} == 0 )); then
213+
echo "No .changes files found in build/; leaving CHANGES_FILE empty" >&2
214+
exit 1
215+
fi
216+
echo "CHANGES_FILE=${files[0]}" >> "$GITHUB_ENV"
217+
218+
206219
- name: Remove files with unauthorized characters
207220
run: |
208221
rm build/*.build
@@ -216,9 +229,8 @@ jobs:
216229
# After the above step that changed the changlog from UNRELEASED to unstable, now create a new changelog entry
217230
# that bumps the version for the next development cycle and sets the suite back to UNRELEASED
218231
- name: Commit changelog suite change
232+
working-directory: ./package-repo
219233
run: |
220-
cd ./package-repo
221-
222234
version=$(dpkg-parsechangelog --show-field Version)
223235
224236
# bump Debian revision (last hyphen-separated field), e.g. 1.0.0-1 -> 1.0.0-2
@@ -242,11 +254,27 @@ jobs:
242254
243255
git commit -a -m "Initial commit of new version ${newversion}"
244256
245-
git push origin ${{inputs.debian-branch}}
246-
git push origin debian/${version}
257+
#TODO reactivate those
258+
#git push origin ${{inputs.debian-branch}}
259+
#git push origin debian/${version}
247260
248261
git log --graph --oneline -n 10 --color=always
249262
263+
264+
- name: Upload to apt artifactory
265+
working-directory: ./build
266+
uses: qualcomm-linux/apt-artifactory-action/upload@main
267+
with:
268+
server_url: "https://apigwx-aws.qualcomm.com/saga/api/qsc/v1/chipSoftware/component/artifactory/release/artifact/debian/public/create/token"
269+
target_base_repo: ${{ github.repository }}
270+
changes_path: ${{env.CHANGES_FILE}}
271+
provenance_info: |
272+
{
273+
"commit": "${{ github.sha }}",
274+
"workflow": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
275+
}
276+
qsc_api_key: ${{ secrets.APT_TOKEN }}
277+
250278
upload-to-s3:
251279
needs: pkg-release
252280
runs-on: 'lecore-prd-u2404-arm64-xlrg-od-ephem'
@@ -280,6 +308,7 @@ jobs:
280308
echo "S3_BUCKET_PATH=${S3_BUCKET_PATH}" >> $GITHUB_ENV
281309
282310
- name: Upload released debian package to S3
311+
if: false
283312
uses: qualcomm-linux/upload-private-artifact-action@aws
284313
with:
285314
s3_bucket: qli-prd-lecore-gh-artifacts

0 commit comments

Comments
 (0)