Skip to content

Commit

Permalink
Only build resource pack on change/release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Jul 12, 2024
1 parent 0597d7d commit 7fbb9a9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'master'
tags-ignore:
- '**'
paths-ignore:
- resource-pack/**
# Enable running CI via other Actions, i.e. for drafting releases and handling PRs.
workflow_call:

Expand Down Expand Up @@ -41,10 +43,3 @@ jobs:
with:
name: api
path: ./api/target/openinvapi*.jar
- name: Build resource pack
id: upload-resource-pack
uses: actions/upload-artifact@v4
with:
name: openinv-legibility-pack
path: ./resource-pack/
compression-level: 9
10 changes: 8 additions & 2 deletions .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ jobs:
- name: Set Release Variables
run: bash ./scripts/set_release_env.sh

- name: Download Artifact
- name: Download build
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Package resource pack
run: |-
pushd resource-pack
zip -r ../dist/openinv-legibility-pack.zip .
popd
- name: Create Release
id: create-release
uses: softprops/[email protected]
Expand All @@ -36,4 +42,4 @@ jobs:
body: ${{ env.GENERATED_CHANGELOG }}
draft: true
prerelease: false
files: ./dist/OpenInv.jar
files: ./dist/**
24 changes: 24 additions & 0 deletions .github/workflows/resource_pack_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Resource Pack CI

on:
push:
branches:
- 'master'
tags-ignore:
- '**'
paths:
- resource-pack/**

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build resource pack
id: upload-resource-pack
uses: actions/upload-artifact@v4
with:
name: openinv-legibility-pack
path: ./resource-pack/
compression-level: 9

0 comments on commit 7fbb9a9

Please sign in to comment.