diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-09-06 18:32:41 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-09-06 18:35:13 +0200 |
| commit | d52e5beced3f49ebfaf71b877555f59d98a30576 (patch) | |
| tree | da68da13993950ad7f789d582e9ab0555f81e76b | |
| parent | aa7a92e95d97a4b428ff685c6bdf1ab5fd3b3268 (diff) | |
| download | Firmament-d52e5beced3f49ebfaf71b877555f59d98a30576.tar.gz Firmament-d52e5beced3f49ebfaf71b877555f59d98a30576.tar.bz2 Firmament-d52e5beced3f49ebfaf71b877555f59d98a30576.zip | |
build: release generator
| -rw-r--r-- | .github/workflows/build.yml | 26 | ||||
| -rwxr-xr-x | docs/generate-changelog.sh | 9 | ||||
| -rw-r--r-- | src/test/kotlin/features/macros/KeyComboTrieCreation.kt | 6 |
3 files changed, 38 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18146a8..ed9ca61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,3 +67,29 @@ jobs: curl "$WEBHOOK_URL" -X POST -H "Content-type: multipart/form-data" --form "files[0]=@$(echo *.jar)" env: WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} + + prepare-release: + name: Prepare a relase + runs-on: ubuntu-22.04 + needs: build + if: ${{ 'push' == github.event_name && startsWith(github.ref, 'refs/tags/') }} + steps: + - uses: actions/checkout@v4 + name: Checkout repository + with: + fetch-tags: true + fetch-depth: 0 + filter: 'tree:0' + + - name: Download generated artifact + uses: actions/download-artifact@v4 + with: + name: built-mod-jar + - name: Generate changelog + run: ./docs/generate-changelog.sh > changelog.md + + - name: Upload release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create -t "Firmament ${GITHUB_REF#refs/tags/}" "${GITHUB_REF#refs/tags/}" -F "changelog.md" "*.jar" diff --git a/docs/generate-changelog.sh b/docs/generate-changelog.sh new file mode 100755 index 0000000..1c71490 --- /dev/null +++ b/docs/generate-changelog.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +dbg() { + echo "$@" >&2 +} + +THIS_VERSION=$(git describe --tags --abbrev=0 HEAD|tr -d '\n') +LAST_VERSION=$(git describe --tags --abbrev=0 HEAD^|tr -d '\n') +echo "**Full Changelog**: <https://github.com/nea89o/Firmament/compare/$LAST_VERSION...$THIS_VERSION>" +git log --pretty='- %s ~%aN' --grep '[no changelog]' --invert-grep --fixed-strings "$LAST_VERSION..$THIS_VERSION" | sort diff --git a/src/test/kotlin/features/macros/KeyComboTrieCreation.kt b/src/test/kotlin/features/macros/KeyComboTrieCreation.kt index f0e7a1b..c3372e4 100644 --- a/src/test/kotlin/features/macros/KeyComboTrieCreation.kt +++ b/src/test/kotlin/features/macros/KeyComboTrieCreation.kt @@ -12,9 +12,9 @@ import moe.nea.firmament.keybindings.SavedKeyBinding class KeyComboTrieCreation { val basicAction = CommandAction("ac Hello") - val aPress = SavedKeyBinding(InputUtil.GLFW_KEY_A) - val bPress = SavedKeyBinding(InputUtil.GLFW_KEY_B) - val cPress = SavedKeyBinding(InputUtil.GLFW_KEY_C) + val aPress = SavedKeyBinding.keyWithoutMods(InputUtil.GLFW_KEY_A) + val bPress = SavedKeyBinding.keyWithoutMods(InputUtil.GLFW_KEY_B) + val cPress = SavedKeyBinding.keyWithoutMods(InputUtil.GLFW_KEY_C) @Test fun testValidShortTrie() { |
