forked from Freezy-Studios/DaCliente
Compare commits
No commits in common. "master" and "master" have entirely different histories.
1 changed files with 9 additions and 31 deletions
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
|
@ -8,45 +8,23 @@ on: [pull_request, push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
uses: https://git.eplg.services/actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: validate gradle wrapper
|
||||||
|
uses: gradle/actions/wrapper-validation@v4
|
||||||
- name: setup jdk
|
- name: setup jdk
|
||||||
uses: https://git.eplg.services/actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
distribution: 'microsoft'
|
distribution: 'microsoft'
|
||||||
- name: imfall
|
|
||||||
run: apt update && apt install tree -y
|
|
||||||
- name: make gradle wrapper executable
|
- name: make gradle wrapper executable
|
||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
- name: build
|
- name: build
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
- name: Generate release tag
|
- name: capture build artifacts
|
||||||
if: github.ref == 'refs/heads/master'
|
uses: actions/upload-artifact@v4
|
||||||
id: tag
|
|
||||||
run: |
|
|
||||||
echo "RELEASE_TAG=build-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
|
|
||||||
- name: Create artifact archive
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
run: |
|
|
||||||
tree
|
|
||||||
mkdir -p release-files
|
|
||||||
cd build/libs/
|
|
||||||
find . -name "*.jar" -o -name "*.war" -o -name "*.zip" | xargs -I{} cp {} ../../release-files/
|
|
||||||
cd ../../
|
|
||||||
echo "Build completed on $(date)" > release-files/build-info.txt
|
|
||||||
echo "Git commit: ${{ github.sha }}" >> release-files/build-info.txt
|
|
||||||
tar -czvf dacliente-build.tar.gz -C release-files .
|
|
||||||
mkdir -p release
|
|
||||||
mv dacliente-build.tar.gz release/
|
|
||||||
- name: Publish to Forgejo Releases
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
uses: https://git.eplg.services/actions/forgejo-release@v2.6.0
|
|
||||||
with:
|
with:
|
||||||
direction: upload
|
name: Artifacts
|
||||||
tag: ${{ env.RELEASE_TAG }}
|
path: build/libs/
|
||||||
release-dir: release
|
|
||||||
release-notes: "Automated build from master branch"
|
|
||||||
override: true
|
|
Loading…
Add table
Add a link
Reference in a new issue