updated root action

This commit is contained in:
Valmo Trindade
2025-01-02 05:04:25 -03:00
parent 9411742a35
commit 239cac7024
3 changed files with 74 additions and 119 deletions

View File

@@ -1,10 +1,36 @@
name: Pack_beta name: Pack_beta
on: on:
pull_request: push:
branches: [main] branches: [monorepo]
jobs: jobs:
package_application:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: simtak
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
retention-days: 1
build_extension: build_extension:
strategy: strategy:
matrix: matrix:
@@ -37,10 +63,10 @@ jobs:
name: ${{ matrix.os_target.target }} name: ${{ matrix.os_target.target }}
path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }} path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }}
if-no-files-found: error if-no-files-found: error
retention-days: 7 retention-days: 1
package: package:
needs: build_extension needs: [build_extension, package_application]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
@@ -52,7 +78,6 @@ jobs:
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: x86_64-pc-windows-msvc name: x86_64-pc-windows-msvc
- run: ls
- run: mv ./armatak.dll ./armatak_x64.dll - run: mv ./armatak.dll ./armatak_x64.dll
- name: Download Windows x86 Artifact - name: Download Windows x86 Artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@@ -63,6 +88,11 @@ jobs:
with: with:
name: x86_64-unknown-linux-gnu name: x86_64-unknown-linux-gnu
- run: mv ./libarmatak.so ./armatak.so - run: mv ./libarmatak.so ./armatak.so
- name: Download Android Application Installer
uses: actions/download-artifact@v4
with:
name: simtak
- run: mv ./app-debug.apk ./simtak.apk
- name: Setup HEMTT - name: Setup HEMTT
uses: arma-actions/hemtt@v1 uses: arma-actions/hemtt@v1
- name: Build - name: Build

View File

@@ -1,105 +0,0 @@
name: Pack_beta
on:
push:
branches: [monorepo]
jobs:
package_application:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: simtak
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
retention-days: 1
build_extension:
strategy:
matrix:
os_target:
- { os: "windows-latest", target: "i686-pc-windows-msvc", artifact: "armatak.dll", name: "armatak.dll" }
- { os: "windows-latest", target: "x86_64-pc-windows-msvc", artifact: "armatak.dll", name: "armatak_x64.dll" }
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu", artifact: "libarmatak.so", name: "armatak.so" }
runs-on: ${{ matrix.os_target.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.os_target.target }}
toolchain: stable
default: true
- name: Install Dependencies (Linux only)
if: matrix.os_target.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Cargo Build
run: cargo build --release --target ${{ matrix.os_target.target }}
- name: check stuff
run: ls target/release
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os_target.target }}
path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }}
if-no-files-found: error
retention-days: 1
package:
needs: [build_extension, package_application]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- run: mkdir -p ./target/release
- name: Download Windows x64 Artifact
uses: actions/download-artifact@v4
with:
name: x86_64-pc-windows-msvc
- run: ls
- run: mv ./armatak.dll ./armatak_x64.dll
- name: Download Windows x86 Artifact
uses: actions/download-artifact@v4
with:
name: i686-pc-windows-msvc
- name: Download Linux x64 Artifact
uses: actions/download-artifact@v4
with:
name: x86_64-unknown-linux-gnu
- run: mv ./libarmatak.so ./armatak.so
- name: Download Android Application Installer
uses: actions/download-artifact@v4
with:
name: simtak
- run: mv ./app-debug.apk ./simtak.apk
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Build
run: hemtt release
- name: Upload Final Package
uses: actions/upload-artifact@v4
with:
name: armatak.zip
path: 'releases/armatak-latest.zip'

View File

@@ -5,6 +5,32 @@ on:
branches: [ main ] branches: [ main ]
jobs: jobs:
package_application:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: simtak
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
retention-days: 1
build_extension: build_extension:
strategy: strategy:
matrix: matrix:
@@ -37,10 +63,10 @@ jobs:
name: ${{ matrix.os_target.target }} name: ${{ matrix.os_target.target }}
path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }} path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }}
if-no-files-found: error if-no-files-found: error
retention-days: 7 retention-days: 1
package: package:
needs: build_extension needs: [build_extension, package_application]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
@@ -52,7 +78,6 @@ jobs:
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: x86_64-pc-windows-msvc name: x86_64-pc-windows-msvc
- run: ls
- run: mv ./armatak.dll ./armatak_x64.dll - run: mv ./armatak.dll ./armatak_x64.dll
- name: Download Windows x86 Artifact - name: Download Windows x86 Artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@@ -63,6 +88,11 @@ jobs:
with: with:
name: x86_64-unknown-linux-gnu name: x86_64-unknown-linux-gnu
- run: mv ./libarmatak.so ./armatak.so - run: mv ./libarmatak.so ./armatak.so
- name: Download Android Application Installer
uses: actions/download-artifact@v4
with:
name: simtak
- run: mv ./app-debug.apk ./simtak.apk
- name: Setup HEMTT - name: Setup HEMTT
uses: arma-actions/hemtt@v1 uses: arma-actions/hemtt@v1
- name: Build - name: Build
@@ -71,10 +101,10 @@ jobs:
run: unzip releases/armatak-latest.zip -d releases run: unzip releases/armatak-latest.zip -d releases
- uses: arma-actions/workshop-upload@v1 - uses: arma-actions/workshop-upload@v1
with: with:
appId: '107410' appId: '107410'
itemId: ${{ secrets.STEAM_WORKSHOP_ITEM_ID }} itemId: ${{ secrets.STEAM_WORKSHOP_ITEM_ID }}
contentPath: releases/@armatak contentPath: releases/@armatak
changelog: 'Update' changelog: 'Update'
env: env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}