Skip to content

Commit

Permalink
workflow changes (#53)
Browse files Browse the repository at this point in the history
* 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
m7rlin committed Jun 13, 2023
1 parent d1a2307 commit 3e2e187
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 2 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/build.yml
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


4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ This plugin adds new mobs and functionality to the game, making it more challeng

| Name | Value |
|-------------------|--------------|
| Java version | 18 |
| Minecraft version | 1.19.4 |
| Java version | 17 |
| Minecraft version | 1.20 |
| IDE | InteliJ IDEA |

## Errors, suggestions
Expand Down
1 change: 1 addition & 0 deletions changelog-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Changelog

0 comments on commit 3e2e187

Please sign in to comment.