Skip to content

Commit

Permalink
feat: github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sequal32 committed Dec 27, 2022
1 parent 11ff6d7 commit 95e23c7
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build
on: [workflow_dispatch]
jobs:
release:
environment: Production
runs-on: windows-latest
steps:
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
with:
path: |
C:/Program Files/LLVM
./llvm
key: llvm-11
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "11.0"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: "Install Python"
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: "Install Rust"
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: "Cache cargo crates"
uses: Swatinem/rust-cache@v2
- name: "Checkout repo"
uses: actions/checkout@v3
- name: "Build executable"
uses: actions-rs/cargo@v1
env:
SERVER_HOSTNAME: ${{ secrets.SERVER_HOSTNAME }}
SERVER_PORT: ${{ secrets.SERVER_PORT }}
with:
command: build
args: --release --all-features
- name: Zip files
run: python scripts/build.py
- name: Upload
uses: actions/[email protected]
with:
name: YourControls
path: "scripts/out/YourControls.zip"
2 changes: 2 additions & 0 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def insert_all_into_zip(zip_obj: ZipFile, directory: str, relative_dir: str = ""
),
)

if not os.path.exists("scripts/out"):
os.mkdir("scripts/out")

zipObj = ZipFile("scripts/out/YourControls.zip", "w", ZIP_DEFLATED)

Expand Down

0 comments on commit 95e23c7

Please sign in to comment.