Skip to content

Commit fc965a8

Browse files
Merge pull request #3 from OneLiteFeatherNET/feature/github-actions
Add GitHub Actions workflows for PR and main branch builds
2 parents 07cd853 + 97863c7 commit fc965a8

File tree

7 files changed

+87
-24
lines changed

7 files changed

+87
-24
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @OneLiteFeatherNET/vulpes-maintainers
2+
/.github/CODEOWNERS @OneLiteFeatherNET/core-team

.github/workflows/build-pr.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build PR
2+
on: [pull_request]
3+
jobs:
4+
build_pr:
5+
if: github.repository_owner == 'OneLiteFeatherNET'
6+
name: Build Pull Request Branch
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest, macos-latest]
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
- name: Setup Java
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: temurin
18+
java-version: 21
19+
- name: Build on ${{ matrix.os }}
20+
run: ./gradlew clean build
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Close invalid PRs
2+
3+
on:
4+
pull_request_target:
5+
types: [ opened ]
6+
7+
jobs:
8+
run:
9+
if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'develop' }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: superbrothers/close-pull-request@v3
13+
with:
14+
comment: "Please do not open pull requests from the `develop` branch, create a new branch instead."

.github/workflows/main-build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Main Branch Build
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
build_and_test:
10+
if: github.repository_owner == 'OneLiteFeatherNET'
11+
name: Build and Test
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@v4
19+
- name: Validate Gradle Wrapper
20+
uses: gradle/wrapper-validation-action@v3
21+
- name: Setup Java
22+
uses: actions/setup-java@v4
23+
with:
24+
distribution: temurin
25+
java-version: 21
26+
- name: Build on ${{ matrix.os }}
27+
run: ./gradlew test
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: draft release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
- develop
8+
pull_request:
9+
types: [opened, reopened, synchronize]
10+
pull_request_target:
11+
types: [opened, reopened, synchronize]
12+
permissions:
13+
contents: read
14+
jobs:
15+
update_release_draft:
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: release-drafter/release-drafter@v6
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitlab-ci.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.gitlab/CODEOWNERS

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)