Skip to content

Commit

Permalink
chore: add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xteamlyer committed Jun 5, 2024
1 parent 59474d0 commit c961612
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

on:
push:
pull_request:
workflow_dispatch:

env:
SOLUTION_FILE_PATH: .

permissions: write-all

jobs:
build:
runs-on: windows-latest
continue-on-error: true

steps:
- name: Check out main repo
uses: actions/checkout@main

- name: Clone routine
run: git clone https://github.com/henrypp/routine.git ../routine

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@main

- name: Build ARM64
run: msbuild /m /p:Configuration=Release /p:Platform=ARM64 ${{env.SOLUTION_FILE_PATH}}

- name: Build x64
run: msbuild /m /p:Configuration=Release /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}

- name: Build x86
run: msbuild /m /p:Configuration=Release /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}}

- name: Archive ARM64
uses: thedoctor0/zip-release@main
with:
type: 'zip'
path: ${{env.SOLUTION_FILE_PATH}}/bin/ARM64/*
filename: 'memreduct-ARM64.zip'

- name: Archive x64
uses: thedoctor0/zip-release@main
with:
type: 'zip'
path: ${{env.SOLUTION_FILE_PATH}}/bin/64/*
filename: 'memreduct-x64.zip'

- name: Archive x86
uses: thedoctor0/zip-release@main
with:
type: 'zip'
path: ${{env.SOLUTION_FILE_PATH}}/bin/32/*
filename: 'memreduct-x86.zip'

- name: Delete release if exist then create release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release view "nightly" && gh release delete "nightly" -y --cleanup-tag
gh release create "nightly" --latest "memreduct-ARM64.zip" "memreduct-x64.zip" "memreduct-x86.zip" -p -t "Nightly build binaries (without install)" --generate-notes

0 comments on commit c961612

Please sign in to comment.