[Idea]: Folia support for OpenInv #196
26
.github/workflows/automerge_dependabot.yml
vendored
Normal file
26
.github/workflows/automerge_dependabot.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Auto-merge Dependabot PRs
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [ "OpenInv CI" ]
|
||||
types: [ completed ]
|
||||
|
||||
jobs:
|
||||
merge-dependabot:
|
||||
if: "github.actor == 'dependabot[bot]'
|
||||
&& github.event.workflow_run.event == 'pull_request'
|
||||
&& github.event.workflow_run.conclusion == 'success'"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Approve
|
||||
uses: hmarr/auto-approve-action@v3.1.0
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
pull-request-number: "${{ github.event.workflow_run.event.pull_request.id }}"
|
||||
- name: Merge
|
||||
uses: pascalgn/automerge-action@v0.15.6
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
MERGE_LABELS: "dependencies,java"
|
||||
MERGE_METHOD: "squash"
|
||||
PULL_REQUEST: "${{ github.event.workflow_run.event.pull_request.id }}"
|
53
.github/workflows/ci.yml
vendored
53
.github/workflows/ci.yml
vendored
@@ -2,7 +2,7 @@ name: OpenInv CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -36,54 +36,3 @@ jobs:
|
||||
with:
|
||||
name: api
|
||||
path: ./api/target/openinvapi*.jar
|
||||
|
||||
merge-dependabot:
|
||||
name: Auto-merge Dependabot PRs
|
||||
needs: [ build ]
|
||||
if: "github.event.name == 'pull_request_target'
|
||||
&& github.actor == 'dependabot[bot]'
|
||||
&& contains( github.event.pull_request.labels.*.name, 'java')"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Approve
|
||||
uses: hmarr/auto-approve-action@v3.1.0
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- name: Merge
|
||||
uses: pascalgn/automerge-action@v0.15.6
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
MERGE_LABELS: "dependencies"
|
||||
MERGE_METHOD: "squash"
|
||||
|
||||
release:
|
||||
name: Create Github Release
|
||||
needs: [ build ]
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Fetch all history - used to assemble changelog.
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set Release Variables
|
||||
run: bash ./scripts/set_release_env.sh
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Create Release
|
||||
id: create-release
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
name: ${{ env.VERSIONED_NAME }}
|
||||
body: ${{ env.GENERATED_CHANGELOG }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
files: ./dist/OpenInv.jar
|
||||
|
44
.github/workflows/draft_release.yml
vendored
Normal file
44
.github/workflows/draft_release.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Draft Github Release
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [ "OpenInv CI" ]
|
||||
types: [ completed ]
|
||||
|
||||
jobs:
|
||||
draft_release:
|
||||
if: "github.event.workflow_run.event == 'push'
|
||||
&& github.event.workflow_run.conclusion == 'success'
|
||||
&& startsWith(github.event.workflow_run.event.push.ref, 'refs/tags/')"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Fetch all history - used to assemble changelog.
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set Release Variables
|
||||
run: bash ./scripts/set_release_env.sh
|
||||
|
||||
- name: Download Artifact
|
||||
# Unfortunately actions/download-artifact cannot fetch from other workflow runs.
|
||||
uses: dawidd6/action-download-artifact@v2.26.0
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
run_id: "${{ github.event.workflow_run.id }}"
|
||||
run_number: "${{ github.event.workflow_run.run_number }}"
|
||||
# Searching for a specific run ID that we know was successful, unset 'success' default.
|
||||
workflow_conclusion: ""
|
||||
|
||||
- name: Create Release
|
||||
id: create-release
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
name: ${{ env.VERSIONED_NAME }}
|
||||
body: ${{ env.GENERATED_CHANGELOG }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
files: ./dist/OpenInv.jar
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2011-2021 lishid. All rights reserved.
|
||||
# Copyright (C) 2011-2023 lishid. All rights reserved.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -36,7 +36,7 @@ function get_minecraft_versions() {
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
# Append comma if variable is set, then append version
|
||||
minecraft_versions="${minecraft_versions:+${minecraft_versions},}${version%%-R*}"
|
||||
minecraft_versions="${minecraft_versions:+${minecraft_versions}, }${version%%-R*}"
|
||||
done
|
||||
|
||||
echo "${minecraft_versions}"
|
||||
|
Reference in New Issue
Block a user