doukutsu-rs/.github/workflows/release.yml

93 lines
2.2 KiB
YAML
Raw Normal View History

2020-09-22 20:21:04 +00:00
name: Release
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Checkout data files
uses: actions/checkout@v2
with:
repository: doukutsu-rs/game-data
path: data
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: cargo build --all --release && strip target/release/doukutsu-rs
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Executable with game data
path: |
target/release/doukutsu-rs
data
!data/README.md
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/doukutsu-rs
data
!data/README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-win:
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Checkout data files
uses: actions/checkout@v2
with:
repository: doukutsu-rs/game-data
path: data
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: cargo build --all --release
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Executable with game data
path: |
target/release/doukutsu-rs.exe
data
!data/README.md
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/doukutsu-rs.exe
data
!data/README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}