Skip to content

Commit

Permalink
Create tarball when new pushes to main
Browse files Browse the repository at this point in the history
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
vmcj committed Jan 12, 2024
1 parent d4f8c86 commit 7fbf5c1
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build-tarball-release.yml
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

0 comments on commit 7fbf5c1

Please sign in to comment.