added and used new github action for publishing packages to packagecloud

This commit is contained in:
stone-w4tch3r 2024-12-01 16:53:12 +05:00
parent 6e69c0567a
commit bb173f6864
3 changed files with 48 additions and 0 deletions

39
.github/workflows/publish-packages.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: Publish to PackageCloud
on:
workflow_call:
inputs:
version:
description: SourceGit package version
required: true
type: string
secrets:
PACKAGECLOUD_TOKEN:
required: true
jobs:
publish:
name: Publish to PackageCloud
runs-on: ubuntu-latest
strategy:
matrix:
runtime: [linux-x64, linux-arm64]
steps:
- name: Install package_cloud
run: gem install package_cloud
- name: Download package artifacts
uses: actions/download-artifact@v4
with:
name: package.${{ matrix.runtime }}
path: packages
- name: Publish DEB package
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
run: |
package_cloud push your-username/sourcegit/debian/any packages/*.deb
- name: Publish RPM package
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
run: |
package_cloud push your-username/sourcegit/rpm_any/rpm_any packages/*.rpm

View file

@ -24,6 +24,14 @@ jobs:
uses: ./.github/workflows/package.yml
with:
version: ${{ needs.version.outputs.version }}
publish-packages:
needs: [package, version]
name: Publish Packages
uses: ./.github/workflows/publish-packages.yml
with:
version: ${{ needs.version.outputs.version }}
secrets:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
release:
needs: [package, version]
name: Release

View file

@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
.github\workflows\package.yml = .github\workflows\package.yml
.github\workflows\release.yml = .github\workflows\release.yml
.github\workflows\localization-check.yml = .github\workflows\localization-check.yml
.github\workflows\publish-packages.yml = .github\workflows\publish-packages.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{49A7C2D6-558C-4FAA-8F5D-EEE81497AED7}"