This repository has been archived by the owner on Nov 16, 2024. It is now read-only.
Merge pull request #2 from C0D3-M4513R/master #8
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
name: Server builds | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
#Ketting PR build fix start | |
- name: Rename Branch, if Pull_Request | |
if: ${{ github.event_name == 'pull_request' }} | |
run: git checkout -B 'branch' | |
#Ketting PR build fix end | |
- name: Setup java 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup gradle | |
run: chmod +x ./gradlew | |
- name: Build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: setup magmaJar | |
- name: Upload artifacts | |
uses: actions/[email protected] | |
with: | |
name: Magma | |
path: projects/magma/build/libs/magma**.jar | |
- name: Create Release | |
if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }} | |
run: | | |
tag=$(git rev-parse --short ${{ github.sha }}) | |
gh release create "$tag" projects/magma/build/libs/magma**.jar \ | |
--repo="$GITHUB_REPOSITORY" \ | |
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ | |
--generate-notes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |