-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create tarball when new pushes to main
This so we can always test that the latest version before a tag can be released. We already had this in the domjudge-packaging but IMO it makes more sense to have this available on GitHub so we can point issue reporters to a potential fix for their issue.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 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 @@ | ||
name: 'Build example tarball' | ||
|
||
on: | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
create-unofficial-tarball: | ||
if: github.repository == 'domjudge/domjudge' | ||
name: Build example tarball (Unofficial) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download our release script | ||
run: wget https://raw.githubusercontent.com/DOMjudge/domjudge-scripts/main/make_release.sh | ||
|
||
- name: Release a fake version | ||
id: version | ||
run: | | ||
DOMJUDGE_VERSION="$(cat README* | head -n 10 | grep ' version ' | sed 's/.*version //')" | ||
NEW_VERSION=${DOMJUDGE_VERSION//DEV} | ||
cp README.md{,.stashed}; cp ChangeLog{,.stashed} | ||
for file in README.md ChangeLog; do | ||
sed -i "s/${DOMJUDGE_VERSION}/${NEW_VERSION}/g" $file | ||
done | ||
echo "DOMJUDGE_VERSION=${DOMJUDGE_VERSION}" >> "$GITHUB_OUTPUT" | ||
sh ./make_release.sh $DOMJUDGE_VERSION | ||
mv domjudge-{$NEW_VERSION,$DOMJUDGE_VERSION}.tar.gz | ||
- name: Install our new version dependencies | ||
run: | | ||
apt update | ||
apt install -y acl zip unzip mariadb-server apache2 php php-fpm php-gd php-cli php-intl php-mbstring \ | ||
php-mysql php-curl php-json php-xml php-zip composer ntp \ | ||
make pkg-config sudo debootstrap libcgroup-dev php-cli php-curl php-json php-xml \ | ||
php-zip lsof procps | ||
- name: Unpack the tarball again | ||
run: tar zxvf domjudge-${{ version.outputs.DOMJUDGE_VERSION }}.tar.gz | ||
|
||
- name: Configure and install in default setting | ||
run: | | ||
./configure | ||
make build | ||
make clean | ||
make all | ||
make clean | ||
make docs | ||
make clean | ||
- name: "See the new_release_howto.txt (L28/domjudge-scripts) for the next step." | ||
run: true | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: unofficial-tarball-${{ version.outputs.DOMJUDGE_VERSION }} | ||
path: domjudge-${{ version.outputs.DOMJUDGE_VERSION }}.tar.gz | ||
|