Skip to content

Commit

Permalink
update:action
Browse files Browse the repository at this point in the history
  • Loading branch information
Dozingfiretruck committed Aug 28, 2024
1 parent 29ced5a commit 75bbe40
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches: [ "master" ]
paths-ignore:
- '.github/workflows/release.yml'
- 'docs/**'
- 'README.md'
- 'README_zh.md'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches: [ "master" ]
paths-ignore:
- '.github/workflows/release.yml'
- 'docs/**'
- 'README.md'
- 'README_zh.md'
Expand Down
79 changes: 72 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ jobs:
run: |
xrepo update-repo
xmake -v -y
cp build/macosx/${{ matrix.arch }}/release/nes nes-macos-${{ matrix.arch }}.app
- uses: actions/upload-artifact@v4
with:
name: nes-macos-${{ matrix.arch }}.app
path: nes-macos-${{ matrix.arch }}.app
cp build/macosx/${{ matrix.arch }}/release/nes nes-macos-${{ matrix.arch }}.bin
- name: Publish file to release
uses: svenstaro/upload-release-action@v2
Expand All @@ -63,12 +58,82 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: nes-macos-${{ matrix.arch }}.app
file: nes-macos-${{ matrix.arch }}.bin
tag: ${{ github.ref }}
overwrite: true

linux:
needs: release
strategy:
matrix:
os: [ubuntu-latest]
arch: [x86_64]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ matrix.os }}-${{ matrix.arch }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: prepare software
run: |
sudo add-apt-repository ppa:xmake-io/xmake -y
# sudo dpkg --add-architecture i386
sudo apt-get update -y
# sudo apt-get install -y lib32z1 libc6:i386 libgcc1:i386 libstdc++5:i386 libstdc++6:i386
sudo apt-get install -y git make gcc p7zip-full libsdl2-dev xmake
sudo apt-get upgrade -y
xmake update
- name: build
run: |
xrepo update-repo
xmake -v -y
cp build/linux/${{ matrix.arch }}/release/nes nes-linux-${{ matrix.arch }}.bin
- name: Publish file to release
uses: svenstaro/upload-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: nes-macos-${{ matrix.arch }}.bin
tag: ${{ github.ref }}
overwrite: true

build:
needs: release
strategy:
matrix:
os: [windows-latest]
arch: [x64]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ matrix.os }}-${{ matrix.arch }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: prepare software
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: build
run: |
xrepo update-repo
xmake -v -y
cp build/windows/${{ matrix.arch }}/release/nes.exe nes-windows-${{ matrix.arch }}.exe
- name: Publish file to release
uses: svenstaro/upload-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: nes-macos-${{ matrix.arch }}.exe
tag: ${{ github.ref }}
overwrite: true



Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches: [ "master" ]
paths-ignore:
- '.github/workflows/release.yml'
- 'docs/**'
- 'README.md'
- 'README_zh.md'
Expand Down

0 comments on commit 75bbe40

Please sign in to comment.