From ece7f8e797162c14ada26898744b0e3d52b968be Mon Sep 17 00:00:00 2001 From: Chase Date: Mon, 3 Jan 2022 11:18:32 -0600 Subject: [PATCH 1/3] Workflow for releasing --- .github/release.sh | 19 +++++++++++++++++++ .github/workflows/release-dev.yml | 22 ++++++++++++++++++++++ .github/workflows/release.yml | 22 ++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .github/release.sh create mode 100644 .github/workflows/release-dev.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/release.sh b/.github/release.sh new file mode 100644 index 0000000..4b126f2 --- /dev/null +++ b/.github/release.sh @@ -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 * diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml new file mode 100644 index 0000000..f167d57 --- /dev/null +++ b/.github/workflows/release-dev.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..254f10c --- /dev/null +++ b/.github/workflows/release.yml @@ -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 From 51889e078ca74a040262a9040f7a5476ed99b287 Mon Sep 17 00:00:00 2001 From: Chase Date: Mon, 3 Jan 2022 13:03:37 -0600 Subject: [PATCH 2/3] release on tags now --- .github/workflows/release-dev.yml | 22 ---------------------- .github/workflows/release.yml | 6 +++--- 2 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/release-dev.yml diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml deleted file mode 100644 index f167d57..0000000 --- a/.github/workflows/release-dev.yml +++ /dev/null @@ -1,22 +0,0 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 254f10c..81eb85d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ name: Release -'on': +on: push: - branches: - - master + tags: + - "*" jobs: create_release: name: Create GitHub Release From 55ea410a82032099baf8c870f80d03582d041da3 Mon Sep 17 00:00:00 2001 From: Chase Date: Mon, 3 Jan 2022 18:13:49 -0600 Subject: [PATCH 3/3] match action readme --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81eb85d..f229821 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,6 @@ jobs: - uses: marvinpinto/action-automatic-releases@latest with: repo_token: '${{ secrets.GITHUB_TOKEN }}' - automatic_release_tag: latest prerelease: false - title: Release files: | release.zip