This commit is contained in:
Valmo Trindade
2024-09-08 00:26:01 -03:00
parent aab17e98fc
commit d2803ef694
3 changed files with 81 additions and 7 deletions

54
.github/workflows/pack_early.yaml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Pack_beta
on:
pull_request:
branches: [ main, dev ]
jobs:
build_extension:
strategy:
matrix:
arrays: [
os: { tag: "windows-latest", target: "i686-pc-windows-msvc" },
os: { tag: "windows-latest", target: "x86_64-pc-windows-msvc" },
]
runs-on: ${{ matrix.arrays.os.tag }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Install latest
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.arrays.os.target }}
toolchain: stable
default: true
- name: Cargo Build
run: cargo build --release
- name: Upload
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arrays.os.target }}
path: target/release/armatak.dll
if-no-files-found: error
retention-days: 30
package:
needs: build_extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/download-artifact@v2
with:
name: x86_64-pc-windows-msvc
- run: mv armatak.dll armatak_x64.dll
- uses: actions/download-artifact@v2
with:
name: i686-pc-windows-msvc
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Build
run: hemtt release
- uses: actions/upload-artifact@v2
with:
name: armatak.zip
path: 'releases/armatak-latest.zip'

View File

@@ -1,4 +1,4 @@
name: Publish name: Publish_stable
on: on:
push: push:

View File

@@ -1,9 +1,7 @@
name: Beta name: Publish_Beta
on: on:
push: push:
branches: [ rust-extension, dev ]
pull_request:
branches: [ dev ] branches: [ dev ]
jobs: jobs:
@@ -50,7 +48,29 @@ jobs:
uses: arma-actions/hemtt@v1 uses: arma-actions/hemtt@v1
- name: Build - name: Build
run: hemtt release run: hemtt release
- uses: actions/upload-artifact@v2 - name: Extract Zipped Mod
run: unzip releases/armatak-latest.zip -d releases
- uses: arma-actions/workshop-upload@v1
with: with:
name: armatak.zip appId: '107410'
path: 'releases/armatak-latest.zip' itemId: ${{ secrets.STEAM_WORKSHOP_ITEM_ID }}
contentPath: releases/@armatak
changelog: 'Update'
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- name: Discord notification
uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
username: ARMATAK
avatar-url: https://media.githubusercontent.com/media/${{ github.repository }}/main/files/picture.png
embed-title: ${{ github.repository }} Updated and Published
embed-url: 'https://github.com/${{ github.repository }}'
embed-description: Commit ${{ github.sha }} - ${{ github.event.head_commit.message }} authorized and updated on Steam Workshop!
embed-author-name: ${{ github.actor }}
embed-author-url: https://github.com/${{ github.actor }}
embed-author-icon-url: https://avatars.githubusercontent.com/${{ github.actor }}
embed-footer-icon-url: https://avatars.githubusercontent.com/${{ github.repository_owner }}
embed-footer-text: ${{ github.repository_owner }}
embed-color: 4849919