diff --git a/.github/labels.json b/.github/labels.json new file mode 100644 index 0000000..b736b8d --- /dev/null +++ b/.github/labels.json @@ -0,0 +1,43 @@ +[ + { + "name": "bug", + "color": "#d73a4a", + "description": "Something isn't working" + }, + { + "name": "bugfix", + "color": "#5e7f03", + "description": "Fix for a bug" + }, + { + "name": "documentation", + "color": "#0075ca", + "description": "Improvements or additions to documentation" + }, + { + "name": "duplicate", + "color": "#cfd3d7", + "description": "This issue or pull request already exists" + }, + { + "name": "feature", + "color": "#21c2c4", + "description": "New feature or request" + }, + { + "name": "enhancement", + "color": "#a2eeef", + "description": "Fixes and improvements for existing feature" + }, + { + "name": "cleanup", + "color": "#00ffcc", + "description": "Code cleanup for existing feature" + }, + { + "name": "ignore changelog", + "color": "#fff", + "description": "Do not add to changelog" + } +] + diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..fe0436b --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,33 @@ +branches: + - master + +name-template: 'v$NEXT_PATCH_VERSION' +tag-template: 'v$NEXT_PATCH_VERSION' + +categories: + - title: '**ADDED:**' + labels: + - feature + - title: '**FIXED:**' + labels: + - bugfix + - title: '**CHANGED:**' + labels: + - cleanup + - enhancement + +exclude-labels: + - 'ignore changelog' + +change-template: '- $TITLE (#$NUMBER)' +template: | + _ArmaForces Medical release._ + + ## Change Log Summary + + $CHANGES + +replacers: + # Category titles + - search: '/\#\# (\*\*(ADDED|FIXED|CHANGED):\*\*)/g' + replace: '$1' diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 0000000..4108cbe --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,11 @@ +on: issues +name: Create Default Labels +jobs: + labels: + name: Default Labels Action + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@1.0.0 + - uses: lannonbr/issue-label-manager-action@2.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..ea2dc27 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,16 @@ +name: Release Drafter + +on: + push: + branches: + - master + +jobs: + draft: + runs-on: ubuntu-latest + steps: + - name: Release Drafter + if: github.repository == 'ArmaForces/Medical' + uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8481f62 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + release: + types: + - published + +jobs: + build_addon: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set VERSION env + run: echo ::set-env name=VERSION::$(echo ${GITHUB_REF:11}) + - name: Build addon with HEMTT + uses: 16AAModTeam/hemtt@stable + with: + command: 'build --release' + # Upload to GitHub + - uses: softprops/action-gh-release@v1 + with: + files: 'releases/ArmaForces_Medical_${{ env.VERSION }}.zip' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Upload to Steam Workshop + - uses: arma-actions/workshop-upload@v1 + with: + itemId: '1981535406' # Id of item to update + contentPath: 'releases/${{ env.VERSION }}/@armaforces_medical' + changelog: 'https://github.com/ArmaForces/Medical/releases/tag/v${{ env.VERSION }}' + env: + STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} + STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} diff --git a/AUTHORS.txt b/AUTHORS.txt index 9064865..4adcd38 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -9,3 +9,4 @@ 3Mydlo3 # CONTRIBUTORS +veteran29 diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index f3da247..fe833d6 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -4,8 +4,8 @@ #include "script_version.hpp" #define VERSION MAJOR.MINOR -#define VERSION_STR MAJOR.MINOR.PATCH.BUILD -#define VERSION_AR MAJOR,MINOR,PATCH,BUILD +#define VERSION_STR MAJOR.MINOR.PATCH +#define VERSION_AR MAJOR,MINOR,PATCH #define REQUIRED_VERSION 1.94 diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 3e6aaab..ef51e98 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,3 @@ #define MAJOR 1 #define MINOR 0 #define PATCH 0 -#define BUILD 0 diff --git a/hemtt.toml b/hemtt.toml index 046bfec..f6a63e1 100644 --- a/hemtt.toml +++ b/hemtt.toml @@ -34,6 +34,6 @@ headerexts = [ [scripts.publish] steps_windows = [ - "powershell ./tools/Publish.ps1 {{version}} YOUR_WORKSHOP_ID '@armaforces_medical'" + "powershell ./tools/Publish.ps1 {{version}} 1981535406 '@armaforces_medical'" ] show_output = true