-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dist: support building packages in Github Actions
Support building packages in Github Actions. This includes to add support building in Ubuntu, since Github Actions only provides Ubuntu based image for Linux build. Note that we don't use install-dependencies.sh on Github Actions, since we will use preinstalled Java to speed up installing dependencies. Closes: #238
- Loading branch information
Showing
5 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- branch-* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build packages | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: '11' | ||
cache: 'maven' | ||
cache-dependency-path: 'scylla-jmx-parent/pom.xml' | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y devscripts debhelper | ||
- name: Build relocatable package | ||
run: | | ||
./reloc/build_reloc.sh --nodeps | ||
echo "VERSION=$(./SCYLLA-VERSION-GEN)" >> "$GITHUB_ENV" | ||
- name: Build RPM | ||
run: | | ||
./reloc/build_rpm.sh --reloc-pkg build/scylla-jmx-${VERSION}.noarch.tar.gz | ||
- name: Build DEB | ||
run: | | ||
./reloc/build_deb.sh --reloc-pkg build/scylla-jmx-${VERSION}.noarch.tar.gz | ||
- name: Upload relocatable package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: scylla-jmx-relocatable-${{env.VERSION}} | ||
path: build/scylla-jmx-*.noarch.tar.gz | ||
if-no-files-found: error | ||
- name: Upload RPM | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: scylla-jmx-rpm-${{env.VERSION}} | ||
path: build/redhat/RPMS/noarch/scylla-jmx-*.noarch.rpm | ||
if-no-files-found: error | ||
- name: Upload DEB | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: scylla-jmx-deb-${{env.VERSION}} | ||
path: build/debian/scylla-jmx_*_all.deb | ||
if-no-files-found: error | ||
- name: Publish packages to release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
generate_release_notes: true | ||
files: | | ||
build/scylla-jmx-*.noarch.tar.gz | ||
build/redhat/RPMS/noarch/scylla-jmx-*.noarch.rpm | ||
build/debian/scylla-jmx_*_all.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
PRODUCT=scylla | ||
VERSION=666.development | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters