Add DEV workshop deployment workflow
Deploy DEV Workshop / deploy-dev-workshop (push) Failing after 1h15m47s
Deploy DEV Workshop / deploy-dev-workshop (push) Failing after 1h15m47s
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
name: Deploy DEV Workshop
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
STEAM_APP_ID: "107410"
|
||||
BRAF_CI_CACHE_DIR: .ci-cache/dev-workshop
|
||||
BRAF_CI_STAGE_DIR: dist/dev/@braf_dev
|
||||
|
||||
jobs:
|
||||
deploy-dev-workshop:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
lfs: true
|
||||
|
||||
- name: Restore PBO cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ci-cache/dev-workshop
|
||||
key: braf-dev-workshop-${{ github.sha }}
|
||||
restore-keys: |
|
||||
braf-dev-workshop-
|
||||
|
||||
- name: Install Mikero tools
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libogg0 libuchardet0 libvorbis0a libvorbisenc2 libvorbisfile3
|
||||
|
||||
curl -fsSL \
|
||||
https://github.com/arma-actions/mikero-tools/archive/refs/heads/master.tar.gz \
|
||||
-o /tmp/mikero-tools-action.tar.gz
|
||||
|
||||
rm -rf /tmp/mikero-tools-action /opt/mikero-tools
|
||||
mkdir -p /tmp/mikero-tools-action /opt/mikero-tools
|
||||
tar -zxf /tmp/mikero-tools-action.tar.gz \
|
||||
--strip-components=1 \
|
||||
-C /tmp/mikero-tools-action
|
||||
|
||||
tar -xf /tmp/mikero-tools-action/linux/*.tar \
|
||||
--strip-components=1 \
|
||||
-C /opt/mikero-tools
|
||||
|
||||
echo "/opt/mikero-tools/bin" >> "$GITHUB_PATH"
|
||||
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/opt/mikero-tools/lib" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Detect global build changes
|
||||
id: changes
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
before="${{ github.event.before }}"
|
||||
after="${{ github.sha }}"
|
||||
|
||||
if [[ -z "${before}" || "${before}" == "0000000000000000000000000000000000000000" ]]; then
|
||||
echo "force_rebuild=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
changed="$(git diff --name-only "${before}" "${after}" || printf '%s\n' '__force_rebuild__')"
|
||||
printf '%s\n' "${changed}"
|
||||
|
||||
if printf '%s\n' "${changed}" | grep -Eq '^(__force_rebuild__|\.gitea/workflows/|make/|mod\.cpp$|meta\.cpp$)'; then
|
||||
echo "force_rebuild=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "force_rebuild=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Build and stage DEV package
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
mkdir -p "$BRAF_CI_CACHE_DIR"
|
||||
|
||||
args=(
|
||||
--cache-dir "$BRAF_CI_CACHE_DIR"
|
||||
--stage-dir "$BRAF_CI_STAGE_DIR"
|
||||
)
|
||||
|
||||
if [[ "${{ steps.changes.outputs.force_rebuild }}" == "true" ]]; then
|
||||
args+=(--force-rebuild)
|
||||
fi
|
||||
|
||||
python3 -m make.ci_dev_workshop "${args[@]}"
|
||||
|
||||
- name: Prepare changelog
|
||||
id: changelog
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
short_sha="$(git rev-parse --short HEAD)"
|
||||
subject="$(git log -1 --pretty=%s)"
|
||||
echo "text=DEV ${short_sha}: ${subject}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload DEV Workshop item
|
||||
uses: https://github.com/arma-actions/workshop-upload@v1
|
||||
env:
|
||||
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
|
||||
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
|
||||
with:
|
||||
appId: ${{ env.STEAM_APP_ID }}
|
||||
itemId: ${{ secrets.STEAM_DEV_ITEM_ID }}
|
||||
contentPath: ${{ env.BRAF_CI_STAGE_DIR }}
|
||||
changelog: ${{ steps.changelog.outputs.text }}
|
||||
Reference in New Issue
Block a user