-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: added check and release workflows
- Loading branch information
1 parent
babbe7b
commit 51372d8
Showing
3 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
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,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" |
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,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/* |
Binary file not shown.