Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Xikaro committed Nov 12, 2024
1 parent 5b667b7 commit 9b2a2ab
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,18 @@ jobs:
name: ${{ inputs.project_full_name }}-multimc
path: .pakku/multimc-overrides/${{ inputs.project_full_name }}-multimc.zip
if-no-files-found: error


build:
name: Build
needs: [build-modpack, build-server, build-multimc]
uses: ./.github/workflows/release.yml
with:
project_version: ${{ inputs.project_version }}
project_name: ${{ inputs.project_name }}
project_full_name: ${{ inputs.project_full_name }}
changelog: ${{ inputs.changelog }}
diff: ${{ inputs.diff }}
release_type: ${{ inputs.release_type }}
minecraft_version: ${{ inputs.minecraft_version }}
secrets: inherit
22 changes: 10 additions & 12 deletions .github/workflows/info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
project_name: ${{ steps.project_name.outputs.value }}
project_full_name: ${{ steps.project_name.outputs.value }}-${{ steps.project_version.outputs.tag }}
changelog: ${{ steps.changelog.outputs.description }}
diff: ${{ steps.lockfile.outputs.diff }}
diff: ${{ steps.check.outputs.diff }}
release_type: ${{ env.RELEASE_TYPE }}
minecraft_version: ${{ env.MINECRAFT_VERSION }}
exists: ${{ steps.check_tag.outputs.exists }}
Expand All @@ -35,28 +35,25 @@ jobs:
fetch-depth: 0

- name: Check file
id: check
shell: bash
run: |
set +e
echo "🔎 Getting modpack info..."
# Проверяем, существет ли pakku-lock.json
if [ ! -f pakku-lock.json ]; then
echo "❌ Could not find pakku-lock.json" && exit 1
else
echo "✔️ pakku-lock.json"
fi
# Проверяем, существет ли pakku.json
if [ ! -f pakku.json ]; then
echo "❌ Could not find pakku.json" && exit 1
else
echo "✔️ pakku.json"
fi
- name: Get previous lockfile
id: lockfile
shell: bash
run: |
set +e
echo "🔎 Getting previous lockfile..."
# Получаем последний тег
latest_tag=$(git describe --tags --abbrev=0)
Expand Down Expand Up @@ -99,6 +96,7 @@ jobs:
cat -v PROJECTS_DIFF.md
echo EOF
} >> "$GITHUB_OUTPUT"
echo "✔️ Formatting completed"

- name: Get Project Name
Expand All @@ -123,7 +121,7 @@ jobs:

- name: Upload Diff
id: diff
if: ${{ steps.lockfile.outputs.diff != '' }}
if: ${{ steps.check.outputs.diff != '' }}
uses: actions/[email protected]
with:
name: Mods-diff
Expand All @@ -143,8 +141,8 @@ jobs:
echo "📃 **Game Version**: ${{ env.MINECRAFT_VERSION }}" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.changelog.outputs.description }}" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ steps.lockfile.outputs.diff != '' }}" ]; then
echo "${{ steps.lockfile.outputs.diff }}" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ steps.check.outputs.diff != '' }}" ]; then
echo "${{ steps.check.outputs.diff }}" >> $GITHUB_STEP_SUMMARY
fi
build:
Expand Down

0 comments on commit 9b2a2ab

Please sign in to comment.