1
0
mirror of https://github.com/XLabsProject/iw4x-rawfiles.git synced 2023-08-02 15:02:11 +02:00

Workflow for releasing

This commit is contained in:
Chase 2022-01-03 11:18:32 -06:00
parent 59074cad3d
commit ece7f8e797
No known key found for this signature in database
GPG Key ID: 9EC29E797878008C
3 changed files with 63 additions and 0 deletions

19
.github/release.sh vendored Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
sudo apt update >> /dev/null && sudo apt install zip -y >> /dev/null # Ensure zip is up to date.
cd iw4x/
cd iw4x_00/
zip -r iw4x_00.iwd *
find . ! -name 'iw4x_00.iwd' -type d -exec rm -rf {} +
find . ! -name 'iw4x_00.iwd' -type f -exec rm -rf {} +
cd ..
cd iw4x_01/
zip -r iw4x_01.iwd *
find . ! -name 'iw4x_01.iwd' -type d -exec rm -rf {} +
find . ! -name 'iw4x_01.iwd' -type f -exec rm -rf {} +
cd ..
cd ..
rm LICENSE
rm README.md
rm -rf .github
zip -r release.zip *

22
.github/workflows/release-dev.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Pre-Release
'on':
push:
branches:
- develop
jobs:
create_release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: 'bash ${GITHUB_WORKSPACE}/.github/release.sh'
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: latest-develop
prerelease: true
title: Pre-Release
files: |
release.zip

22
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Release
'on':
push:
branches:
- master
jobs:
create_release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: 'bash ${GITHUB_WORKSPACE}/.github/release.sh'
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: latest
prerelease: false
title: Release
files: |
release.zip