forked from NearInfinityBrowser/NearInfinity
-
Notifications
You must be signed in to change notification settings - Fork 15
32 lines (30 loc) · 980 Bytes
/
ant.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Java CI with Apache Ant
on:
push:
branches: [ devel ]
# pull_request:
# branches: [ devel ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Build with Ant
run: |
hash=$(echo "${{ github.sha }}" | sed -e 's/\(.\{7\}\).*/\1/')
sed -i "s/\(VERSION *= *\"v\?[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\)[^\"]*\"/\1-$(date +%Y%m%d) (${hash})\"/" src/org/infinity/NearInfinity.java
sed -i 's/debug="false"/debug="true"/' build.xml
ant -noinput -buildfile build.xml
- name: Upload artifact
if: ${{ github.repository == 'Argent77/NearInfinity' }}
uses: pyTooling/Actions/releaser@r2
with:
tag: nightly
rm: true
token: ${{ secrets.GITHUB_TOKEN }}
files: NearInfinity.jar