From 2fd677550383892edf177b0fd025b21b59699d37 Mon Sep 17 00:00:00 2001 From: AndreasBrostrom Date: Mon, 29 Jul 2024 13:20:10 +0200 Subject: [PATCH] added tag release deploy --- .github/workflows/deploy-release.yml | 24 ++++++++++++++++++++++++ .github/workflows/deploy.yml | 12 +++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/deploy-release.yml diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml new file mode 100644 index 00000000..0e04b451 --- /dev/null +++ b/.github/workflows/deploy-release.yml @@ -0,0 +1,24 @@ +name: Deploy Release +on: + release: + types: [published] + +jobs: + release: + runs-on: windows-latest + steps: + - name: Checkout the source code + uses: actions/checkout@v4 + - name: Setup HEMTT + uses: arma-actions/hemtt@v1 + - name: Run HEMTT release + run: | + hemtt release + Rename-Item release\cav-latest.zip 7CavAddon-${{github.ref_name}}.zip + - name: Upload release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + asset_name: 7CavAddon-${{github.ref_name}}.zip + file: release/7CavAddon-${{github.ref_name}}.zip diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3b323870..6d0a9cc0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,8 +24,10 @@ jobs: if: ${{ inputs.environment == 'live' }} run: | hemtt release - Get-ChildItem -Path .hemttout\ - Get-ChildItem -Path releases\ + Get-ChildItem -Path .hemttout\ -ErrorAction SilentlyContinue + Get-ChildItem -Path .release\ -ErrorAction SilentlyContinue + Rename-Item release\cav-latest.zip 7CavAddon-${{github.ref_name}}.zip + Get-ChildItem -Path .release\ -ErrorAction SilentlyContinue env: ENVIRONMENT: ${{ inputs.environment }} @@ -33,7 +35,7 @@ jobs: if: ${{ inputs.environment == 'dev' }} run: | hemtt build - Get-ChildItem -Path .hemttout\ - Get-ChildItem -Path releases\ + Get-ChildItem -Path .hemttout\ -ErrorAction SilentlyContinue + Get-ChildItem -Path .release\ -ErrorAction SilentlyContinue env: - ENVIRONMENT: ${{ inputs.environment }} \ No newline at end of file + ENVIRONMENT: ${{ inputs.environment }}