Skip to content

Commit

Permalink
Add full CI/CD pipeline (#3)
Browse files Browse the repository at this point in the history
* Add CI pipeline configs

* Update AUTHORS.txt

* Remove BUILD from mod version

We're not using it anyway
  • Loading branch information
veteran29 authored and 3Mydlo3 committed Jan 28, 2020
1 parent 99197d1 commit 75fa2f5
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 4 deletions.
43 changes: 43 additions & 0 deletions .github/labels.json
Original file line number Diff line number Diff line change
@@ -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"
}
]

33 changes: 33 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -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'
11 changes: 11 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: issues
name: Create Default Labels
jobs:
labels:
name: Default Labels Action
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: lannonbr/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -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 }}
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
3Mydlo3

# CONTRIBUTORS
veteran29
4 changes: 2 additions & 2 deletions addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define MAJOR 1
#define MINOR 0
#define PATCH 0
#define BUILD 0
2 changes: 1 addition & 1 deletion hemtt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 75fa2f5

Please sign in to comment.