Skip to content

Commit

Permalink
Merge pull request #3 from kade-robertson/patch-1
Browse files Browse the repository at this point in the history
ci: add release builds for multiple platforms
  • Loading branch information
BezPowell authored Sep 15, 2022
2 parents 7fdb7d4 + 2849ca8 commit d55613d
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Builds

on:
release:
types: [published]

jobs:
release_builds:
name: rusty_roms-release
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
if: "!github.event.release.prerelease"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust Cache
uses: Swatinem/[email protected]
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Set outputs
id: vars
run: |
echo "::set-output name=version::$(cargo pkgid | cut -d# -f2 | cut -d: -f2)"
- name: Build
run: cargo build --release
- name: Move executable
run: |
npm install -g move-file-cli mkdirp
mkdirp artifacts
if [ "$RUNNER_OS" == "Windows" ]; then
move-file target/release/rusty_roms.exe artifacts/rusty_roms-windows.exe
elif [ "$RUNNER_OS" == "Linux" ]; then
move-file target/release/rusty_roms artifacts/rusty_roms-linux
else
move-file target/release/rusty_roms artifacts/rusty_roms-mac
fi
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/*
tag_name: "v${{ steps.vars.outputs.version }}"

0 comments on commit d55613d

Please sign in to comment.