Binarize: fix copy files from addons folder path #556
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [main] | |
tags: | |
- v* | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: ${{ matrix.os.name }} | |
runs-on: ${{ matrix.os.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- runner: ubuntu-latest | |
name: ubuntu | |
artifact: linux-x64 | |
exe: hemtt | |
- runner: windows-latest | |
name: windows | |
artifact: windows-x64 | |
exe: hemtt.exe | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: build | |
- name: Compile | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os.artifact }} | |
path: target/release/${{ matrix.os.exe }} | |
mods: | |
name: ${{ matrix.os.name }} / ${{ matrix.mod.repo }} | |
runs-on: ${{ matrix.os.runner }} | |
needs: | |
- build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- runner: ubuntu-latest | |
name: ubuntu | |
artifact: linux-x64 | |
- runner: windows-latest | |
name: windows | |
artifact: windows-x64 | |
mod: | |
- repo: CBATeam/CBA_A3 | |
commit: e48c270da63574368c7a8f553ea64a29a339d40d | |
- repo: acemod/ACE3 | |
commit: 8104c8f465ed561a079c2c17330dae074183c319 | |
- repo: ArmaForces/Mods | |
commit: 6871517d4c2f720cea62b767eb7ec422bf712f51 | |
- repo: Theseus-Aegis/Mods | |
commit: 445ec5fc71bbd01d57252be2794947c2bfe79988 | |
- repo: SynixeContractors/Mod | |
commit: b767891bfc098c92bf3108d77a5cf1b5929b98e8 | |
steps: | |
- name: Download HEMTT | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.os.artifact }} | |
path: hemtt | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ matrix.mod.repo }} | |
path: mod | |
ref: ${{ matrix.mod.commit }} | |
- name: Install Linux | |
if: startsWith(matrix.os.runner, 'ubuntu') | |
run: | | |
cd hemtt && cp hemtt /usr/local/bin/hemtt && chmod +x /usr/local/bin/hemtt | |
- name: Install Windows | |
if: startsWith(matrix.os.runner, 'windows') | |
run: | | |
cd hemtt && copy hemtt.exe C:\Windows\System32\hemtt.exe | |
- name: Run `hemtt dev` on ${{ matrix.mod.repo }} | |
run: | | |
cd mod && hemtt dev | |
- name: Install Arma 3 Tools | |
if: startsWith(matrix.os.runner, 'windows') | |
uses: arma-actions/arma3-tools@master | |
with: | |
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }} | |
- name: Run `hemtt build` on ${{ matrix.mod.repo }} | |
run: | | |
cd mod && hemtt build | |
release: | |
name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Linux x64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: linux-x64 | |
path: release | |
- name: Download Windows x64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows-x64 | |
path: release | |
- name: Zip Linux x64 | |
run: | | |
cd release && zip linux-x64.zip hemtt && rm hemtt | |
- name: Create Release Version | |
run: | | |
VERSION=${GITHUB_REF_NAME#v} | |
echo Version: $VERSION | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Pack for Chocolatey | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: pack .github/choco/hemtt.nuspec --version ${{ env.VERSION }} --outputdirectory release | |
- name: Zip Windows x64 | |
run: | | |
cd release && zip windows-x64.zip hemtt.exe && rm hemtt.exe | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
release/* | |
draft: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |