Skip to content

fix: Added permissions #68

fix: Added permissions

fix: Added permissions #68

Workflow file for this run

name: MPP CI and Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: clean build
- name: Retrieve version # Gets version from filename matched by regex
run: |
echo "VERSION_TAG=$(ls /home/runner/work/MPP/MPP/build/libs | grep -E 'MPP-[0-9\.]+\.[0-9]+-[0-9.]+-[A-Z]+\.jar' | rev | cut -c5- | rev)" >> $GITHUB_OUTPUT
id: version
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: ${{ steps.version.outputs.VERSION_TAG }}
title: "Release ${{ steps.version.outputs.VERSION_TAG }}"
prerelease: true
files: |
/home/runner/work/MPP/MPP/build/libs/${{ steps.version.outputs.VERSION_TAG }}.jar
/home/runner/work/MPP/MPP/build/resourcepack/${{ steps.version.outputs.VERSION_TAG }}.zip