Skip to content

Commit

Permalink
Merge branch 'main' into ci/publish
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon authored Jun 10, 2024
2 parents 0ce38dd + 8d1148d commit 6d06f29
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
push:
pull_request:

# Only allow running one build job at a time to optimise cache hits
concurrency:
Expand All @@ -10,6 +11,9 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
# Avoid duplicate runs when both `push` and `pull_request` are triggered:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
concurrency:
group: builds

# Grant GITHUB_TOKEN write access
# GITHUB_TOKEN only needs read access because we'll use a PAT to push
permissions:
contents: write
contents: read

env:
# sed expression to strip whitespace from property keys
Expand Down Expand Up @@ -63,6 +63,14 @@ jobs:
id: commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
# We need to commit as a user to ensure CI is run on the commit
# We need to push as an admin/owner to bypass branch-protection
token: ${{ secrets.HASHALITE_PAT }}
# Ensure we commit as a bot, since we can't reliably get an author slug from `github.actor`
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: ${{ github.actor }} <41898282+github-actions[bot]@users.noreply.github.com>
# The commit message, specify the new version
commit_message: Bump version to ${{ steps.new_props.outputs.mod_version }}

- name: Summarize
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ subprojects {
draft = true
}

// Format display name "[Fabric] Freecam 1.2.2 for MC 1.20.4"
displayName = "[${project.name.capitalize()}] ${rootProject.name.capitalize()} ${rootProject.mod_version} for MC ${rootProject.minecraft_version}"
// Format display name, e.g. "1.2.4 for MC 1.20.4 (fabric)"
displayName = "${rootProject.mod_version} for MC ${rootProject.minecraft_version} (${project.name})"
version = project.version
versionType = rootProject.release_type
curseEnvironment = "client"
Expand Down

0 comments on commit 6d06f29

Please sign in to comment.