Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to new GT recipeMap #145

Merged
merged 6 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,31 @@ jobs:

- name: Set release version
run: |
IFS='-' read -r mv pv <<< "${GITHUB_REF#refs/*/}"
IFS='-' read -r mv pv <<< "${{ github.ref_name }}"
echo "MC_VERSION=${mv}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${pv}" >> $GITHUB_ENV
echo "VERSION=${pv}" >> $GITHUB_ENV

- name: Set up JDK 8
- name: Validate gradle wrapper checksum
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 8 and 17
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
java-version: |
8
17
distribution: 'zulu'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup the workspace
run: ./gradlew --info --stacktrace ${{ inputs.workspace }}
run: ./gradlew --build-cache --info --stacktrace ${{ inputs.workspace }}

- name: Build the mod
run: ./gradlew --info --stacktrace build
run: ./gradlew --build-cache --info --stacktrace build

# Continue on error in the following steps to make sure releases still get made even if one of the methods fails

Expand All @@ -50,25 +55,16 @@ jobs:

- name: Release under current tag
run: |
PRERELEASE="--prerelease"
export "CHANGELOG_FILE=$(mktemp --suffix=.md)"
echo "CHANGELOG_FILE=${CHANGELOG_FILE}" >> $GITHUB_ENV
gh api --method POST -H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \
-f tag_name="${MC_VERSION}-${RELEASE_VERSION}" \
--jq ".body" > "${CHANGELOG_FILE}"
cat "${CHANGELOG_FILE}"
gh release create "${MC_VERSION}-${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" ./build/libs/*.jar
gh release create "${MC_VERSION}-${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" $PRERELEASE ./build/libs/*.jar
shell: bash
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Maven, Modrinth and CurseForge
run: ./gradlew --info --stacktrace build publish
continue-on-error: true
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
if: ${{ env.MAVEN_USER != '' }}
Loading