Skip to content

refactor: Teleport entities (#225) #63

refactor: Teleport entities (#225)

refactor: Teleport entities (#225) #63

Workflow file for this run

on:
push:
branches:
- 'master'
tags-ignore:
- '*'
- '**'
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: false
name: Release Deploy
jobs:
release:
runs-on: windows-latest
env:
FGD_BUILD_DIR: build
MD_BUILD_DIR: build_md
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required for finding the right tags
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install srctools
run: python -m pip install srctools
- name: FGD build and folder copy
run: .\build.bat fgd all
- name: Zip Momentum FGD
uses: thedoctor0/zip-release@master
with:
type: 'zip'
directory: ./${{ env.FGD_BUILD_DIR }}/momentum/
filename: 'fgd-momentum.zip'
- name: Zip P2CE FGD
uses: thedoctor0/zip-release@master
with:
type: 'zip'
directory: ./${{ env.FGD_BUILD_DIR }}/p2ce/
filename: 'fgd-p2ce.zip'
- name: MD build
run: .\build.bat md all
- name: Zip Momentum MD
uses: thedoctor0/zip-release@master
with:
type: 'zip'
directory: ./${{ env.MD_BUILD_DIR }}/momentum/
filename: 'md-momentum.zip'
- name: Zip P2CE MD
uses: thedoctor0/zip-release@master
with:
type: 'zip'
directory: ./${{ env.MD_BUILD_DIR }}/p2ce/
filename: 'md-p2ce.zip'
- name: Artifact Upload
uses: actions/upload-artifact@v3
with:
name: build_${{ github.event.inputs.version }}-${{ github.sha }}
path: |
./${{ env.FGD_BUILD_DIR }}/momentum/fgd-momentum.zip
./${{ env.FGD_BUILD_DIR }}/p2ce/fgd-p2ce.zip
./${{ env.MD_BUILD_DIR }}/momentum/md-momentum.zip
./${{ env.MD_BUILD_DIR }}/p2ce/md-p2ce.zip
if-no-files-found: error
- name: Get previous tag
id: previoustag
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Next Monotonic Release version
id: next
uses: WyriHaximus/github-action-next-release-version@08a7476c98e8095fad1cce0e2344c7892e17d111
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: Create Rolling Release
uses: softprops/action-gh-release@v1
if: ${{ github.event.inputs.version == '' }}
with:
tag_name: ${{ steps.next.outputs.version }}
files: |
${{ env.FGD_BUILD_DIR }}/momentum/fgd-momentum.zip
${{ env.FGD_BUILD_DIR }}/p2ce/fgd-p2ce.zip
${{ env.MD_BUILD_DIR }}/momentum/md-momentum.zip
${{ env.MD_BUILD_DIR }}/p2ce/md-p2ce.zip
fail_on_unmatched_files: true
- name: Create Manual Release
uses: softprops/action-gh-release@v1
if: ${{ github.event.inputs.version != '' }}
with:
tag_name: ${{ github.event.inputs.version }}
files: |
${{ env.FGD_BUILD_DIR }}/momentum/fgd-momentum.zip
${{ env.FGD_BUILD_DIR }}/p2ce/fgd-p2ce.zip
${{ env.MD_BUILD_DIR }}/momentum/md-momentum.zip
${{ env.MD_BUILD_DIR }}/p2ce/md-p2ce.zip
fail_on_unmatched_files: true