Skip to content

Commit

Permalink
Tools - Add auto-upload workflow for release (#328)
Browse files Browse the repository at this point in the history
**When merged this pull request will:**
- Title
I hate workflows and testing it

### IMPORTANT

- [x] [Development
Guidelines](https://ace3.acemod.org/wiki/development/) are read,
understood and applied.
- [x] Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
MiszczuZPolski authored May 30, 2023
1 parent fedb5d3 commit 98658fc
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = false
15 changes: 12 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: Documentation
on:
push:
branches:
- master
workflow_dispatch:

- master

jobs:
update:
runs-on: ubuntu-latest
Expand All @@ -23,3 +22,13 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 tools/deploy.py

draft:
runs-on: ubuntu-latest
steps:
- name: Release Drafter
if: github.repository == 'KAT-Advanced-Medical/KAM'
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release

on:
release:
types: released

permissions:
contents: write

jobs:
release-addon:
runs-on: ubuntu-latest
steps:
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV
- name: Checkout the source code
uses: actions/checkout@v2
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt release
- name: Move release to releases folder
run:
version="${{ github.event.release.tag_name }}"
mv releases/kat-latest.zip "@Kat-Advanced-Medical-${{ env.VERSION }}.zip"
- name: Update Release with Files
uses: softprops/action-gh-release@v1
with:
files: ./@Kat-Advanced-Medical-*.zip
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update to Steam Workshop (stable)
uses: arma-actions/workshop-upload@v1
with:
itemId: '2020940806'
contentPath: './@Kat-Advanced-Medical-*.zip'
changelog: |
https://github.com/KAT-Advanced-Medical/KAM/releases/tag/v${{ env.VERSION }}
${{ github.event.release.body }}
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- name: Update to Steam Workshop (dev)
uses: arma-actions/workshop-upload@v1
with:
itemId: '2774641073'
contentPath: './@Kat-Advanced-Medical-*.zip'
changelog: |
https://github.com/KAT-Advanced-Medical/KAM/releases/tag/v${{ env.VERSION }}
${{ github.event.release.body }}
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}

0 comments on commit 98658fc

Please sign in to comment.