mirror of
https://github.com/tribes2/SkillSector.git
synced 2026-01-19 19:44:48 +00:00
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
name: SkillSector distribution
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository code
|
|
uses: actions/checkout@v4
|
|
- name: Disable development mode when creating a release
|
|
run: |
|
|
sed -i "s/DEVMODE.*=.*1;/DEVMODE = 0;/" scripts/SkillSectorGame.cs
|
|
- name: Update SkillSector version to match GitHub tag
|
|
run: |
|
|
VERSION_FILE='scripts/SkillSectorGame.cs'
|
|
NEW_VERSION="\"${{ github.ref_name }}\""
|
|
sed -i "s/\(\$SkillSector::Version = \)[^;]*;/\1${NEW_VERSION};/" "$VERSION_FILE"
|
|
- name: Build and release a vl2 using the vl2-builder action
|
|
id: 'release'
|
|
uses: tribes2/vl2-builder@v2.0
|
|
with:
|
|
tag-name: ${{ github.ref_name }}
|
|
archive-prefix: 'SkillSector'
|
|
exclude-patterns: '.git/*, *.zip, *.vl2, .github/*'
|
|
- name: Report build success for the fun of it
|
|
run: |
|
|
echo "Successfully released asset: ${{ steps.release.outputs.asset_name }}"
|