Skip to content

add:test release.yml #7

add:test release.yml

add:test release.yml #7

Workflow file for this run

name: Create Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
body: |
[CHANGELOG](https://github.com/Dozingfiretruck/nes/blob/master/docs/CHANGELOG.md#Changelog)
[更新日志](https://github.com/Dozingfiretruck/nes/blob/master/docs/CHANGELOG.md#更新日志)
draft: false
prerelease: false
macos:
needs: release
strategy:
matrix:
os: [macos-latest]
arch: [arm64]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ matrix.os }}-${{ matrix.arch }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: prepare software
run: |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install make sdl2 xmake
xmake update
- name: build
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
- 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 }}.app
tag: ${{ github.ref }}
overwrite: true