-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.github @mbainter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "10:00" | ||
timezone: "America/Chicago" | ||
commit-message: | ||
prefix: "chore: " | ||
include: "scope" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: 'Validate PR title' | ||
|
||
permissions: | ||
pull-requests: read | ||
checks: read | ||
statuses: write | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Please look up the latest version from | ||
# https://github.com/amannn/action-semantic-pull-request/releases | ||
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
# Configure which types are allowed. | ||
# Default: https://github.com/commitizen/conventional-commit-types | ||
types: | | ||
fix | ||
feat | ||
docs | ||
ci | ||
chore | ||
style | ||
refactor | ||
test | ||
requireScope: false | ||
subjectPattern: ^[A-Z].+$ | ||
subjectPatternError: | | ||
The subject "{subject}" found in the pull request title "{title}" | ||
didn't match the configured pattern. Please ensure that the subject | ||
starts with an uppercase character. | ||
# For work-in-progress PRs you can typically use draft pull requests | ||
# from Github. However, private repositories on the free plan don't have | ||
# this option and therefore this action allows you to opt-in to using the | ||
# special "[WIP]" prefix to indicate this state. This will avoid the | ||
# validation of the PR title and the pull request checks remain pending. | ||
# Note that a second check will be reported if this is enabled. | ||
wip: true | ||
# When using "Squash and merge" on a PR with only one commit, GitHub | ||
# will suggest using that commit message instead of the PR title for the | ||
# merge commit, and it's easy to commit this by mistake. Enable this option | ||
# to also validate the commit message for one commit PRs. | ||
validateSingleCommit: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build and release | ||
on: | ||
# Create the tests pass... | ||
workflow_run: | ||
workflows: | ||
- Run tests | ||
branches: | ||
- main | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
env: | ||
DATAPACK_BASENAME: "bmc3-mining-dimension" | ||
|
||
jobs: | ||
release: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run PackSquash | ||
uses: ComunidadAylas/PackSquash-action@v4 | ||
with: | ||
artifact_name: "$DATAPACK_BASENAME" | ||
packsquash_version: latest | ||
options: | | ||
pack-directory = '.' | ||
output_file_path = '/tmp/${DATAPACK_BASENAME}.zip' | ||
- name: Tag and create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: "v${{ github.run_number }}" | ||
files: "/tmp/${DATAPACK_BASENAME}.zip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Run tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- data/** | ||
jobs: | ||
build-main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Clones repository so it has access to the files | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Determine the pull-request id | ||
id: pr | ||
run: echo "::set-output name=pr_number::$(gh pr view --json number -q .number || echo "")" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Checks mcfunction files for errors | ||
- name: Check commands | ||
uses: mcbeet/check-commands@v1 | ||
with: | ||
source: . | ||
minecraft: 1.19 | ||
# Checks JSON for errors | ||
- name: Check JSON | ||
uses: ocular-d/[email protected] | ||
# Uploads an artifact that you can download and use in your Minecraft world | ||
- name: Compile and upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: bmc3-mining-dimension-pr${{steps.pr.outputs.pr_number}} | ||
path: | | ||
data/ | ||
pack.mcmeta | ||
pack.png | ||
# Errors if files aren't found | ||
if-no-files-found: error |