Skip to content

Commit

Permalink
ci: Add Archlinux package.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngirard committed Sep 16, 2024
1 parent 30e5d3b commit 38c6a2d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,30 @@ jobs:
id: extract_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: Create DEB Package
- name: Create DEB package
uses: burningalchemist/nfpm-action@v1
id: deb-package
with:
nfpm_version: "2.35.1"
config: "nfpm.yaml" # Replace with your nfpm configuration file
nfpm_version: "2.40.0"
config: "nfpm.yaml"
packager: "deb"

- name: Create RPM Package
- name: Create RPM package
uses: burningalchemist/nfpm-action@v1
id: rpm-package
with:
nfpm_version: "2.35.1"
config: "nfpm.yaml" # Replace with your nfpm configuration file
nfpm_version: "2.40.0"
config: "nfpm.yaml"
packager: "rpm"

- name: Create RPM package
uses: burningalchemist/nfpm-action@v1
id: archlinux-package
with:
nfpm_version: "2.40.0"
config: "nfpm.yaml"
packager: "archlinux"

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
Expand All @@ -44,7 +52,7 @@ jobs:
draft: false
prerelease: false

- name: Upload DEB Package to Release
- name: Upload DEB package to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -54,7 +62,7 @@ jobs:
asset_name: sqlite-shell-lib_${{ env.VERSION }}_amd64.deb
asset_content_type: application/vnd.debian.binary-package

- name: Upload RPM Package to Release
- name: Upload RPM package to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -63,3 +71,13 @@ jobs:
asset_path: ${{ steps.rpm-package.outputs.package }}
asset_name: sqlite-shell-lib_${{ env.VERSION }}_amd64.rpm
asset_content_type: application/x-rpm

- name: Upload Archlinux package to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.archlinux-package.outputs.package }}
asset_name: sqlite-shell-lib_${{ env.VERSION }}_amd64.pkg.tar.zst
asset_content_type: application/zstd
18 changes: 11 additions & 7 deletions nfpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ disable_globbing: false
version: ${VERSION}
version_schema: semver

# Dependencies.
depends:
- sqlite3

# Contents to add to the package
contents:
- src: src/sqlite-shell-lib.sh
Expand All @@ -26,6 +22,14 @@ contents:
# Umask to be used on files without explicit mode set.
umask: 0o002

# Custom configuration applied only to the Deb packager.
deb:
compression: gzip
overrides:
archlinux:
depends:
- sqlite
deb:
depends:
- sqlite3
#compression: gzip
rpm:
depends:
- sqlite3

0 comments on commit 38c6a2d

Please sign in to comment.