Skip to content

Commit

Permalink
build: update builds and add workflows to gha (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
majestyotbr authored Oct 26, 2023
1 parent fba9622 commit d923c48
Show file tree
Hide file tree
Showing 10 changed files with 255 additions and 4 deletions.
65 changes: 65 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: Report a problem/bug
description: Any issues that you have found while using the server
labels: ["Type: Bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this issue!
- type: dropdown
id: priority
attributes:
label: Priority
description: How critical is this?
options:
- Low
- Medium
- High
- Critical
validations:
required: true

- type: checkboxes
id: area
attributes:
label: Area
description: Where is the problem?
options:
- label: Data
- label: Source
- label: Docker
- label: Other
validations:
required: true

- type: textarea
id: what-happened
attributes:
label: What happened?
description: Describe your problem/bug and add screenshots, logs or anything that can help verifying the bug
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true

- type: dropdown
id: os
attributes:
label: What OS are you seeing the problem on?
multiple: true
options:
- Linux
- Windows
- MacOS
validations:
required: true

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/opentibiabr/canary/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
blank_issues_enabled: false
contact_links:
- name: 'Help / Support'
url: 'https://discord.gg/gvTj5sh9Mp'
about: If you have support question or need help, please use our Discord Server.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Request
description: Any request
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this issue!
- type: dropdown
id: priority
attributes:
label: Priority
description: How critical is this?
options:
- Missing Content
- Enhancement
validations:
required: true

- type: checkboxes
id: area
attributes:
label: Area
description: Where is the problem?
options:
- label: Data
- label: Source
- label: Docker
- label: Other
validations:
required: true

- type: textarea
id: missing-content
attributes:
label: What is missing?
description: script, module, etc. Attach screenshots, logs, etc, anything that can helps us
validations:
required: true

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct]
options:
- label: I agree to follow this project's Code of Conduct
required: true
49 changes: 49 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Behaviour
### **Actual**

Do this and that doesn't happens

### **Expected**

Do this and that happens

## Fixes

\# (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

**Test Configuration**:

- Server Version:
- Client:
- Operating System:

## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I checked the PR checks reports
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
6 changes: 6 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"Area: Source":
- any: ['src/**/*']

"Area: Datapack":
- any: ['data/**/*']
21 changes: 17 additions & 4 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
push:
paths:
- 'src/**'
branches:
- main

Expand All @@ -13,6 +17,15 @@ env:
MAKEFLAGS: '-j 2'

jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Android:
name: android-25
runs-on: windows-2022
Expand Down Expand Up @@ -49,7 +62,7 @@ jobs:
- name: Download Apache Ant
run: |
$url = "https://github.com/opentibiabr/otcv8/releases/download/binary-files/apache-ant-1.9.3-bin.zip"
$url = "https://github.com/opentibiabr/otcv8/releases/download/binary-files/apache-ant-1.9.7-bin.zip"
$outputFile = "ant.zip"
Invoke-WebRequest -Uri $url -OutFile $outputFile
Expand Down Expand Up @@ -93,12 +106,12 @@ jobs:
cd android
$env:VS_AndroidHome="C:\Android\android-sdk\build-tools_r30-windows"
$env:VS_NdkRoot="C:\Android\android-sdk\android-ndk-r23c"
$env:VS_AntHome="C:\Android\android-sdk\apache-ant-1.9.3"
$env:VS_AntHome="C:\Android\android-sdk\apache-ant-1.9.7"
$env:VS_JavaHome="C:\Android\android-sdk\jdk8u302-b08"
MSBuild.exe /p:Configuration=Release /p:Platform="ARM64" /p:BUILD_REVISION=${{github.run_number}}
MSBuild.exe /p:Configuration=Release /p:Platform="ARM" /p:BUILD_REVISION=${{github.run_number}}
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: otclientv8-android-${{ github.sha }}
path: android/otclientv8/ARM64/Release/otclientv8.apk
path: android/otclientv8/ARM/Release/otclientv8_armv7a.apk
13 changes: 13 additions & 0 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
push:
paths:
- 'src/**'
branches:
- main

Expand All @@ -14,6 +18,15 @@ env:
MAKEFLAGS: '-j 2'

jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: ${{ matrix.os }}-${{ matrix.buildtype }}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
push:
paths:
- 'src/**'
branches:
- main

Expand All @@ -14,6 +18,15 @@ env:
MAKEFLAGS: '-j 2'

jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: ${{ matrix.os }}-${{ matrix.buildtype }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Issue - Labeling
on:
workflow_dispatch:
issues:
types: ['opened']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: Renato66/auto-label@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ignore-comments: true
labels-synonyms: '{
"Priority: Low":["Low"],
"Priority: Medium":["Medium"],
"Priority: High":["High"],
"Priority: Critical":["Critical"],
"Area: Datapack":["[X] Datapack"],
"Area: Source":["[X] Source"],
"Area: Map":["[X] Map"],
"Type: Enhancement":["Enhancement"],
"Type: Missing Content":["Missing Content"]
}'
default-labels: '["Status: Pending Test"]'
12 changes: 12 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: 'PR - Labeler'
on:
- pull_request_target

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'

0 comments on commit d923c48

Please sign in to comment.