[Idea]: Folia support for OpenInv #196
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -2,8 +2,6 @@ name: OpenInv CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
create:
|
|
||||||
types: [tag]
|
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -51,18 +49,20 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
name: Create Github Release
|
name: Create Github Release
|
||||||
needs: [ build ]
|
needs: [ build ]
|
||||||
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set Release Variables
|
||||||
|
run: bash ./scripts/set_release_env.sh
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
|
|
||||||
- name: Set Release Variables
|
|
||||||
run: . scripts/set_release_env.sh
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create-release
|
id: create-release
|
||||||
uses: softprops/action-gh-release@v0.1.5
|
uses: softprops/action-gh-release@v0.1.5
|
||||||
@@ -73,4 +73,4 @@ jobs:
|
|||||||
body: ${{ env.GENERATED_CHANGELOG }}
|
body: ${{ env.GENERATED_CHANGELOG }}
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: ./OpenInv.jar
|
files: ./dist/OpenInv.jar
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -10,6 +10,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set CurseForge Variables
|
- name: Set CurseForge Variables
|
||||||
run: . scripts/set_curseforge_env.sh
|
run: . scripts/set_curseforge_env.sh
|
||||||
|
@@ -21,9 +21,6 @@
|
|||||||
# Query GitHub for the username of the given email address.
|
# Query GitHub for the username of the given email address.
|
||||||
# Falls through to the given author name.
|
# Falls through to the given author name.
|
||||||
function lookup_email_username() {
|
function lookup_email_username() {
|
||||||
# Ensure fallthrough is set
|
|
||||||
${2:?Must provide email and username as parameters, i.e. 'lookup_email_username admin@example.com Admin'}
|
|
||||||
|
|
||||||
lookup=$(curl -G --data-urlencode "q=$1 in:email" https://api.github.com/search/users -H 'Accept: application/vnd.github.v3+json' | grep '"login":' | sed -e 's/^.*": "//g' -e 's/",.*$//g')
|
lookup=$(curl -G --data-urlencode "q=$1 in:email" https://api.github.com/search/users -H 'Accept: application/vnd.github.v3+json' | grep '"login":' | sed -e 's/^.*": "//g' -e 's/",.*$//g')
|
||||||
|
|
||||||
if [[ $lookup ]]; then
|
if [[ $lookup ]]; then
|
||||||
@@ -45,8 +42,10 @@ function get_minecraft_versions() {
|
|||||||
echo "${minecraft_versions}"
|
echo "${minecraft_versions}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
previous_tag=$(git describe --tags --abbrev=0 @^)
|
||||||
|
|
||||||
# Use formatted log to pull authors list
|
# Use formatted log to pull authors list
|
||||||
authors_raw=$(git log --pretty=format:"%ae|%an" "$(git describe --tags --abbrev=0 @^)"..@)
|
authors_raw=$(git log --pretty=format:"%ae|%an" "$previous_tag"..@)
|
||||||
readarray -t authors <<<"$authors_raw"
|
readarray -t authors <<<"$authors_raw"
|
||||||
|
|
||||||
# Use associative array to map email to author name
|
# Use associative array to map email to author name
|
||||||
@@ -69,7 +68,7 @@ for author in "${authors[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Fetch actual formatted changelog
|
# Fetch actual formatted changelog
|
||||||
changelog=$(git log --pretty=format:"* %s (%h) - %ae" "$(git describe --tags --abbrev=0 @^)"..@)
|
changelog=$(git log --pretty=format:"* %s (%h) - %ae" "$previous_tag"..@)
|
||||||
|
|
||||||
for author_email in "${!author_data[@]}"; do
|
for author_email in "${!author_data[@]}"; do
|
||||||
# Ignore case when matching
|
# Ignore case when matching
|
||||||
@@ -80,4 +79,4 @@ done
|
|||||||
|
|
||||||
minecraft_versions=$(get_minecraft_versions)
|
minecraft_versions=$(get_minecraft_versions)
|
||||||
|
|
||||||
printf "## Supported Minecraft versions\n%s\n\n##Changelog\n%s" "${minecraft_versions}" "${changelog}"
|
printf "## Supported Minecraft versions\n%s\n\n## Changelog\n%s" "${minecraft_versions}" "${changelog}"
|
||||||
|
Reference in New Issue
Block a user