linted publish actions

This commit is contained in:
Valmo Trindade
2024-12-05 03:11:40 -03:00
parent 7fdab33fb5
commit 78538233e6
3 changed files with 59 additions and 114 deletions

View File

@@ -4,7 +4,6 @@ on:
push: push:
branches: branches:
- dev - dev
- websocket
pull_request: pull_request:
branches: [ main, dev ] branches: [ main, dev ]

View File

@@ -1,54 +1,63 @@
name: Publish_stable name: Publish
on: on:
push: push:
branches: branches: [ main ]
- main
jobs: jobs:
lint: build_extension:
runs-on: ubuntu-latest strategy:
steps: matrix:
- name: Checkout the source code arrays: [
uses: actions/checkout@v3 os: { tag: "windows-latest", target: "i686-pc-windows-msvc" },
- name: Lint (sqflint) os: { tag: "windows-latest", target: "x86_64-pc-windows-msvc" },
uses: arma-actions/sqflint@master ]
continue-on-error: true runs-on: ${{ matrix.arrays.os.tag }}
steps:
publish: - name: Checkout Repo
runs-on: ubuntu-latest uses: actions/checkout@v4
steps: with:
- name: Checkout Repo lfs: true
uses: actions/checkout@v4 - name: Install latest
with: uses: actions-rs/toolchain@v1
lfs: true with:
- name: Setup HEMTT target: ${{ matrix.arrays.os.target }}
uses: arma-actions/hemtt@v1 toolchain: stable
- name: Run HEMTT build default: true
run: hemtt release - name: Cargo Build
- name: Extract Zipped Mod run: cargo build --release
run: unzip releases/armatak-latest.zip -d releases - name: Upload
- uses: arma-actions/workshop-upload@v1 uses: actions/upload-artifact@v2
with: with:
appId: '107410' name: ${{ matrix.arrays.os.target }}
itemId: ${{ secrets.STEAM_WORKSHOP_ITEM_ID }} path: target/release/armatak.dll
contentPath: releases/@armatak if-no-files-found: error
changelog: 'Update' retention-days: 30
env: package:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} needs: build_extension
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} runs-on: ubuntu-latest
- name: Discord notification steps:
uses: tsickert/discord-webhook@v5.3.0 - uses: actions/checkout@v1
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK }} - uses: actions/download-artifact@v2
username: ARMATAK with:
avatar-url: https://media.githubusercontent.com/media/${{ github.repository }}/main/picture.png name: x86_64-pc-windows-msvc
embed-title: ${{ github.repository }} Updated and Published - run: mv ./armatak.dll ./armatak_x64.dll
embed-url: 'https://github.com/${{ github.repository }}' - uses: actions/download-artifact@v2
embed-description: Commit ${{ github.sha }} - ${{ github.event.head_commit.message }} authorized and updated on Steam Workshop! with:
embed-author-name: ${{ github.actor }} name: i686-pc-windows-msvc
embed-author-url: https://github.com/${{ github.actor }} - name: Setup HEMTT
embed-author-icon-url: https://avatars.githubusercontent.com/${{ github.actor }} uses: arma-actions/hemtt@v1
embed-footer-icon-url: https://avatars.githubusercontent.com/${{ github.repository_owner }} - name: Build
embed-footer-text: ${{ github.repository_owner }} run: hemtt release
embed-color: 4849919 - name: Extract Zipped Mod
run: unzip releases/armatak-latest.zip -d releases
- uses: arma-actions/workshop-upload@v1
with:
appId: '107410'
itemId: ${{ secrets.STEAM_WORKSHOP_ITEM_ID }}
contentPath: releases/@armatak
changelog: 'Update'
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}

View File

@@ -1,63 +0,0 @@
name: Publish_Beta
on:
push:
branches: [ main ]
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@v4
with:
lfs: true
- 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
- name: Extract Zipped Mod
run: unzip releases/armatak-latest.zip -d releases
- uses: arma-actions/workshop-upload@v1
with:
appId: '107410'
itemId: ${{ secrets.STEAM_WORKSHOP_ITEM_ID }}
contentPath: releases/@armatak
changelog: 'Update'
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}