Skip to content

Commit 4392893

Browse files
Added repositories for deb/rpm packages on buildkite (#780)
* added and used new github action for publishing packages to packagecloud * publish-packages.yml WIP * publish-packages.yml now uses curl push * fix naming from packagecloud to buildkite * Add debug logs to publish-packages.yml * fix package path * change repo name to sourcegit * fixed unused code * added --fail to curl pushes * Remove leftowers from release.yml
1 parent abaccca commit 4392893

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to Buildkite
2+
on:
3+
workflow_call:
4+
secrets:
5+
BUILDKITE_TOKEN:
6+
required: true
7+
jobs:
8+
publish:
9+
name: Publish to Buildkite
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
runtime: [linux-x64, linux-arm64]
14+
steps:
15+
- name: Download package artifacts
16+
uses: actions/download-artifact@v4
17+
with:
18+
name: package.${{ matrix.runtime }}
19+
path: packages
20+
21+
- name: Publish DEB package
22+
env:
23+
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
24+
run: |
25+
FILE=$(echo packages/*.deb)
26+
curl -X POST https://api.buildkite.com/v2/packages/organizations/sourcegit/registries/sourcegit-deb/packages \
27+
-H "Authorization: Bearer $BUILDKITE_TOKEN" \
28+
-F "file=@$FILE" \
29+
--fail
30+
31+
- name: Publish RPM package
32+
env:
33+
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
34+
run: |
35+
FILE=$(echo packages/*.rpm)
36+
curl -X POST https://api.buildkite.com/v2/packages/organizations/sourcegit/registries/sourcegit-rpm/packages \
37+
-H "Authorization: Bearer $BUILDKITE_TOKEN" \
38+
-F "file=@$FILE" \
39+
--fail

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
uses: ./.github/workflows/package.yml
2525
with:
2626
version: ${{ needs.version.outputs.version }}
27+
publish-packages:
28+
name: Publish Packages
29+
uses: ./.github/workflows/publish-packages.yml
30+
secrets:
31+
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
2732
release:
2833
needs: [package, version]
2934
name: Release

SourceGit.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
1818
.github\workflows\package.yml = .github\workflows\package.yml
1919
.github\workflows\release.yml = .github\workflows\release.yml
2020
.github\workflows\localization-check.yml = .github\workflows\localization-check.yml
21+
.github\workflows\publish-packages.yml = .github\workflows\publish-packages.yml
2122
EndProjectSection
2223
EndProject
2324
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{49A7C2D6-558C-4FAA-8F5D-EEE81497AED7}"

0 commit comments

Comments
 (0)