This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
Fixed #53 #51 #43 #111
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 #nessesary for tag creation and release creation | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- 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/upload-artifact@v3.1.2 | |
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 }} |