Skip to content

Commit 1558bc8

Browse files
committed
misc: reorganize to match Mpf. Cleanup CI.
1 parent f671fd7 commit 1558bc8

File tree

62 files changed

+410
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+410
-171
lines changed

.github/workflows/build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build
2+
on: [ push, pull_request ]
3+
4+
defaults:
5+
run:
6+
shell: bash
7+
8+
jobs:
9+
build:
10+
name: Build ${{ matrix.rid }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- os: windows-latest
17+
rid: win-x64
18+
- os: windows-latest
19+
rid: win-x86
20+
- os: macos-latest
21+
rid: osx-x64
22+
- os: ubuntu-latest
23+
rid: linux-x64
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-dotnet@v1
27+
with:
28+
dotnet-version: '3.1.x'
29+
- name: Build
30+
run: |
31+
cd VisualPinball.Engine.PinMAME
32+
dotnet build -c Release -r ${{ matrix.rid }}
33+
# - name: Test
34+
# run: |
35+
# cd VisualPinball.Engine.PinMAME.Test
36+
# dotnet run -c Release -r ${{ matrix.rid }}
37+
- run: |
38+
mkdir tmp
39+
cp -r VisualPinball.Engine.PinMAME.Unity/Plugins/${{ matrix.rid }} tmp
40+
- uses: actions/upload-artifact@v2
41+
with:
42+
name: Plugins
43+
path: tmp
44+
45+
dispatch:
46+
runs-on: ubuntu-latest
47+
needs: [ build ]
48+
if: github.repository == 'VisualPinball/VisualPinball.Engine.PinMAME' && github.ref == 'refs/heads/master' && github.event_name == 'push'
49+
steps:
50+
- uses: peter-evans/repository-dispatch@v1
51+
with:
52+
token: ${{ secrets.GH_PAT }}
53+
event-type: build-complete
54+
client-payload: '{"artifacts_run_id": "${{ github.run_id }}"}'

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish
2+
on:
3+
repository_dispatch:
4+
types: [ release-complete ]
5+
6+
jobs:
7+
registry:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: dawidd6/action-download-artifact@v2
12+
with:
13+
workflow: build
14+
run_id: ${{ github.event.client_payload.artifacts_run_id }}
15+
path: VisualPinball.Engine.PinMAME.Unity
16+
- name: Publish
17+
run: |
18+
cd VisualPinball.Engine.PinMAME.Unity
19+
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
20+
npm publish
21+
env:
22+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
on:
3+
repository_dispatch:
4+
types: [ build-complete ]
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- name: Fetch next version
14+
id: nextVersion
15+
uses: VisualPinball/[email protected]
16+
with:
17+
path: VisualPinball.Engine.PinMAME.Unity
18+
tagPrefix: 'v'
19+
- name: Bump
20+
if: ${{ steps.nextVersion.outputs.isBump == 'true' }}
21+
run: |
22+
cd VisualPinball.Engine.PinMAME.Unity
23+
npm version ${{ steps.nextVersion.outputs.nextVersion }} --no-git-tag-version
24+
- name: Commit
25+
id: commit
26+
if: ${{ steps.nextVersion.outputs.isBump == 'true' }}
27+
run: |
28+
git config user.name "github-actions"
29+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
30+
git add VisualPinball.Engine.PinMAME.Unity/package.json
31+
git commit -m "release: ${{ steps.nextVersion.outputs.nextTag }}."
32+
git push
33+
commitish=$(git rev-parse HEAD)
34+
echo ::set-output name=commitish::${commitish}
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
- name: Create Release
38+
uses: actions/create-release@v1
39+
with:
40+
tag_name: ${{ steps.nextVersion.outputs.nextTag }}
41+
release_name: ${{ steps.nextVersion.outputs.nextTag }}
42+
prerelease: ${{ steps.nextVersion.outputs.isPrerelease }}
43+
commitish: ${{ steps.commit.outputs.commitish }}
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
47+
dispatch:
48+
runs-on: ubuntu-latest
49+
needs: [ release ]
50+
steps:
51+
- uses: peter-evans/repository-dispatch@v1
52+
with:
53+
token: ${{ secrets.GH_PAT }}
54+
event-type: release-complete
55+
client-payload: '{"artifacts_run_id": "${{ github.event.client_payload.artifacts_run_id }}"}'

.github/workflows/update-pinmame-native.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/update-pinmame.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ bld/
3030
[Oo]bj/
3131
[Ll]og/
3232
[Ll]ogs/
33+
lsp/
3334

3435
# Visual Studio 2015/2017 cache/options directory
3536
.vs/
@@ -348,4 +349,7 @@ MigrationBackup/
348349
# Ionide (cross platform F# VS Code tools) working folder
349350
.ionide/
350351

351-
.idea/
352+
.idea/
353+
354+
**/protos/*.cs
355+
**/Plugins/*/*.meta

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 freezy
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Plugins/linux-x64/PinMame.dll

-13 KB
Binary file not shown.
-9.21 MB
Binary file not shown.

Plugins/osx-x64/PinMame.dll

-13 KB
Binary file not shown.

0 commit comments

Comments
 (0)