From 51372d8e75298a1dba362c19e1f1bdd85dcb7b19 Mon Sep 17 00:00:00 2001 From: Jonas Geiler Date: Thu, 19 Sep 2024 20:27:35 +0200 Subject: [PATCH] ci: added check and release workflows --- .github/workflows/check.yml | 35 +++++++++++++ .github/workflows/release.yml | 67 +++++++++++++++++++++++++ joysticktester/graphics/icon/multi.ico | Bin 0 -> 15406 bytes 3 files changed, 102 insertions(+) create mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/release.yml create mode 100644 joysticktester/graphics/icon/multi.ico diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..0eab58b --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,35 @@ +name: Check + +on: + push: + branches: + - main + paths: + - 'joysticktester/**' + + pull_request: + branches: + - main + paths: + - 'joysticktester/**' + + workflow_dispatch: + workflow_call: + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Set up Lua + uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0 + + - name: Set up LuaRocks + uses: hishamhm/gh-actions-luarocks@master + + - name: Run luacheck on Lua files + run: luarocks install luacheck && luacheck . --no-cache --formatter TAP --include-files "joysticktester/**/*.lua" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..582b271 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,67 @@ +name: Release + +on: + push: + tags: + - 'v*.*.*' + +jobs: + check: + name: Check + uses: ./.github/workflows/check.yml + + package-and-github-release: + name: Package & GitHub Release + runs-on: ubuntu-latest + needs: check + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Set up JOYSTICKTESTER_VERSION + run: | + JOYSTICKTESTER_VERSION="${GITHUB_REF_NAME#v}" + echo "JOYSTICKTESTER_VERSION=$JOYSTICKTESTER_VERSION" + echo "JOYSTICKTESTER_VERSION=$JOYSTICKTESTER_VERSION" >> "$GITHUB_ENV" + + - name: Create love file + uses: love-actions/love-actions-core@v1.1.0 + with: + build-list: ./joysticktester/ + package-path: ./build/joysticktester.love + + - name: Create Windows packages + uses: love-actions/love-actions-windows@v1.1.3 + with: + love-package: ./build/joysticktester.love + icon-path: ./joysticktester/graphics/icon/multi.ico + product-name: joysticktester + project-website: https://github.com/${{ github.repository }} + output-folder: ./build/ + + - name: Create Linux packages + uses: love-actions/love-actions-linux@v1.2.2 + with: + app-name: Joystick Tester + bundle-id: com.jonasgeiler.joysticktester + description: A simple tool to test joysticks and gamepads + version-string: ${{ env.JOYSTICKTESTER_VERSION }} + icon-path: ./joysticktester/graphics/icon/512.png + love-package: ./build/joysticktester.love + product-name: joysticktester + output-folder: ./build/ + + - name: List files + run: ls -liashR ./build/ + + - name: Draft release on GitHub + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 + with: + draft: true + generate_release_notes: true + fail_on_unmatched_files: true + files: ./build/* diff --git a/joysticktester/graphics/icon/multi.ico b/joysticktester/graphics/icon/multi.ico new file mode 100644 index 0000000000000000000000000000000000000000..41878e9e51dfa7bfe5fecf50be15de177a4300e4 GIT binary patch literal 15406 zcmeHN3viUx6<&O_Qk9T>Z}ypFlig(B+3ari5eP^iKp+SNYIz7DKmbt)DNqCiw2F$f zDmr4-IzC$KOw~G0o!aU2rLC_z9j6bc;$zei+iGjI)~Y3^-?_VYb9ea@Q>EIe`DgCj z^PhX~Ip2NXd(PGA#_3MhO`NDh?9ug|qSGaHI-SRp|Myqwbhm&PjTX}Db-G`ebUHus zpa@Fj`H222-;5@|ZE`Z%-Pox6+-McJ-MZ7ViO8Z&vo8F`9n4lVHz)p{JXc;0lH(bhs%lm1?tY2pJj+S0VBYdY1s?UY6y znLnG1J_;Fk^M5KDBrnR&JS#&NeR(bI9#})(TIaF)8rLAxyTF?81lfep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