-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Create main.yml * Rename main.yml to bump_version.yml * Update README.md #patch * Update bump_version.yml * Update bump_version.yml * Update bump_version.yml #patch test * Update bump_version.yml #patch * Update build.yml * Create changelog-release.md * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Dev (#51) * Update build.yml * Delete bump_version.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml (#52) * Update build.yml * Update build.yml * Update build.yml * Update build.yml * Update build.yml
- Loading branch information
Showing
3 changed files
with
89 additions
and
2 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,86 @@ | ||
name: Java CI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: maven | ||
|
||
- name: Get project version | ||
uses: avides/[email protected] | ||
id: actions_project_version_check | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
file-to-check: plugin/pom.xml | ||
only-return-version: true | ||
|
||
- name: Display version (debug) | ||
run: echo "New version is:" ${{ steps.actions_project_version_check.outputs.version }} | ||
|
||
- name: Build with Maven | ||
run: | | ||
mvn -B package --file ./plugin/pom.xml | ||
mkdir staging && cp plugin/target/original-*.jar "staging/MagicznaKraina-v$Project_Version.jar" | ||
env: | ||
Project_Version: ${{ steps.actions_project_version_check.outputs.version }} | ||
|
||
- name: Upload jar file as .zip | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MagicznaKraina-v${{ steps.actions_project_version_check.outputs.version }} | ||
path: staging/**.jar | ||
if-no-files-found: error | ||
|
||
release: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
name: 🚀 release | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: 📚 checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get project version | ||
uses: avides/[email protected] | ||
id: actions_project_version_check | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
file-to-check: plugin/pom.xml | ||
only-return-version: true | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@master | ||
with: | ||
name: MagicznaKraina-v${{ steps.actions_project_version_check.outputs.version }} | ||
path: downloads | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
working-directory: downloads | ||
|
||
- name: create release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
generateReleaseNotes: true | ||
bodyFile: 'changelog-release.md' | ||
artifacts: downloads/MagicznaKraina-v${{ steps.actions_project_version_check.outputs.version }}.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
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 @@ | ||
## Changelog |