Skip to content

Commit

Permalink
Added release generator
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Apr 13, 2024
1 parent 4aaf485 commit b5f2125
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/hemtt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ jobs:
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -r addons\
rm -r optionals\
rm -r include\
xcopy /e /h /q pullrequest\addons addons\
xcopy /e /h /q pullrequest\optionals optionals\
xcopy /e /h /q pullrequest\include include\
- name: Run HEMTT build
run: hemtt build
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: "tagged-release"

on:
push:
tags:
- "v*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: windows-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Checkout pull request
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Replace addons with pull request addons
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -r addons\
rm -r include\
xcopy /e /h /q pullrequest\addons addons\
xcopy /e /h /q pullrequest\include include\
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
run: mv .hemttout/build .hemttout/@release
- name: Zip build
run: Compress-Archive .hemttout/@release -Destination zeus_additions_${{ github.ref_name }}.zip
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ github.ref_name }}"
prerelease: false
files: zeus_additions_${{ github.ref_name }}.zip

0 comments on commit b5f2125

Please sign in to comment.