Add release action

more-targets
Titan Yuan 2024-09-27 18:01:17 -07:00
parent df54c734b3
commit 10abfac4c7
4 changed files with 64 additions and 8 deletions

View File

@ -1,12 +1,12 @@
name: Build project
name: Build
on:
push:
branches:
- release
pull_request:
branches:
- release
push:
branches:
- release
pull_request:
branches:
- release
jobs:
buildForAllSupportedPlatforms:
@ -45,4 +45,4 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}

27
.github/workflows/release.md vendored Normal file
View File

@ -0,0 +1,27 @@
# micromissiles-unity
## Build ${{ github.ref }}
## Instructions
Download and extract the archive corresponding to your platform (Windows or Mac) from the binaries listed below.
## Windows
1. Download the zip file for Windows: `micromissiles-${{ github.ref }}-windows_x86_64.zip`.
2. Unzip the zip file. The zip file should contain a single directory called `micromissiles-${{ github.ref }}-windows_x86_64`.
3. Run `micromissiles-<version>-StandaloneWindows64.exe`.
## Mac
1. Download the zip file for Darwin: `micromissiles-${{ github.ref }}-darwin.zip`.
2. Unzip the zip file. The zip file should contain a single app file.
3. Change the permission of the app file recursively by running:
```bash
chmod -R +x micromissiles-<version>-StandaloneOSX.app
```
4. Open the app file.
5. If you get a warning that Apple cannot check the application for malicious software:
* Open `System Preferences`.
* Navigate to `Privacy & Security`.
* Click on `Open Anyway` to bypass Apple's developer check.

25
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Release
on:
workflow_run:
workflows: ['Build']
types: [completed]
branches:
- release
jobs:
build:
name: Create release
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: .github/workflows/release.md
draft: false
prerelease: false

View File

@ -10,6 +10,10 @@ You can find the latest release [here](https://github.com/PisterLab/micromissile
## Windows
1. Download the zip file for Windows: `micromissiles-<version>-windows_x86_64.zip`.
2. Unzip the zip file. The zip file should contain a single directory called `micromissiles-<version>-windows_x86_64`.
3. Run `micromissiles-<version>-StandaloneWindows64.exe`.
## Mac
1. Download the zip file for Darwin: `micromissiles-<version>-darwin.zip`.