Remove Github Serivce #1
Workflow file for this run
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Slimefun DEV | |
on: | |
push: | |
branches: | |
- dev | |
paths: | |
- 'src/**' | |
- 'pom.xml' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
java-package: jdk | |
architecture: x64 | |
cache: maven | |
- name: Build Slimefun | |
run: mvn -B package --errors | |
- name: Mask Output | |
run: | | |
echo "::add-mask::$CF_API_TOKEN" | |
env: | |
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
- name: Get build artifact filename | |
run: | | |
cd target && FILENAME=$(find . -maxdepth 1 -mindepth 1 -name "Slimefun-*" | cut -d'/' -f 2) | |
echo "slimefun-artifact-name=$FILENAME" >> "$GITHUB_ENV" | |
cd .. | |
- name: Upload Build to R2 | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
command: "r2 object put slimefun-dev/${{ env.slimefun-artifact-name }} --file=./target/${{ env.slimefun-artifact-name }} --content-type=application/java-archive" |