-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
- package-ecosystem: "maven" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Auto-merge Dependabot PRs | ||
|
||
on: | ||
workflow_run: | ||
workflows: [ "Pull Request" ] | ||
types: [ completed ] | ||
|
||
jobs: | ||
automerge-dependabot-pr: | ||
if: "github.actor == 'dependabot[bot]' | ||
&& github.event.workflow_run.event == 'pull_request' | ||
&& github.event.workflow_run.conclusion == 'success'" | ||
uses: Jikoo/PlanarActions/.github/workflows/pr_automerge_complete.yml@master | ||
with: | ||
triggering-workflow-run: ${{ github.event.workflow_run.id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,37 @@ | ||
name: CI | ||
name: Build | ||
|
||
on: | ||
push: | ||
pull_request_target: | ||
branches-ignore: | ||
- dependabot/** | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Up Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '17' | ||
|
||
# Use cache to speed up build | ||
- name: Cache Maven Repo | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Build With Maven | ||
run: mvn -e clean package -am -P all | ||
|
||
# Upload artifacts | ||
- name: Upload Distributable Jar | ||
id: upload-final | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: ./target/AnvilUnlocker.jar | ||
run-ci: | ||
uses: Jikoo/PlanarActions/.github/workflows/ci_maven.yml@master | ||
|
||
release: | ||
name: Create Github Release | ||
needs: [ build ] | ||
needs: [ run-ci ] | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ github.event.repository.name }}-ci | ||
path: ${{ github.event.repository.name }}-ci | ||
|
||
- name: Parse Tag Name | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
|
||
- name: Create Release | ||
id: create-release | ||
uses: softprops/action-gh-release@v0.1.5 | ||
uses: softprops/action-gh-release@v2.1.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: AnvilUnlocker ${{ steps.get_version.outputs.result }} | ||
draft: true | ||
prerelease: true | ||
files: ./dist/AnvilUnlocker.jar | ||
files: ./${{ github.event.repository.name }}-ci/AnvilUnlocker.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
run-ci: | ||
uses: Jikoo/PlanarActions/.github/workflows/ci_maven.yml@master | ||
store-dependabot-pr-data: | ||
if: "github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'" | ||
uses: Jikoo/PlanarActions/.github/workflows/pr_automerge_prep.yml@master | ||
with: | ||
pr-number: ${{ github.event.number }} |