Skip to content

Commit

Permalink
Can be manually triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Jan 13, 2024
1 parent 7f24421 commit d45401e
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/build-tarball-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: 'Build example tarball'

on:
push:
branches: [main, create_tarball]
workflow_dispatch:
inputs:
DOMJUDGE_VERSION:
description: DOMjudge git tag
default: 8.3.0

jobs:
create-unofficial-tarball:
Expand All @@ -12,21 +15,9 @@ jobs:
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
- name: Create release tarball
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_ENV
sh ./make_release.sh $DOMJUDGE_VERSION
mv domjudge-{$NEW_VERSION,$DOMJUDGE_VERSION}.tar.gz
sh ./make_release.sh ${{ github.event.inputs.DOMJUDGE_VERSION }}
- name: Install our new version dependencies
run: |
Expand All @@ -37,7 +28,7 @@ jobs:
php-zip lsof procps
- name: Unpack the tarball again
run: tar zxvf domjudge-${{ env.DOMJUDGE_VERSION }}.tar.gz
run: tar zxvf domjudge-${{ github.event.inputs.DOMJUDGE_VERSION }}.tar.gz

- name: Configure and install in default setting
run: |
Expand All @@ -54,6 +45,6 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: unofficial-tarball-${{ env.DOMJUDGE_VERSION }}
path: domjudge-${{ env.DOMJUDGE_VERSION }}.tar.gz
name: unofficial-tarball-${{ github.event.inputs.DOMJUDGE_VERSION }}
path: domjudge-${{ github.event.inputs.DOMJUDGE_VERSION }}.tar.gz

0 comments on commit d45401e

Please sign in to comment.