-
Notifications
You must be signed in to change notification settings - Fork 31
Refonte de la Pipeline CI/CD #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
109 commits
Select commit
Hold shift + click to select a range
5b67c64
fix: List.of() creates immutable list
PiquelChips 1c9ff25
fix: Rename invitation variable to avoid confusion
PiquelChips aa00342
feat: _iambibi's work
PiquelChips d11123b
Update README.md
PiquelChips f697aaf
Merge pull request #1 from PiquelChips/Fix
PiquelChips 0a79695
feat: fix creation of tag
PiquelChips f1d8c36
Update README.md
PiquelChips 50c18e5
Update README.md
PiquelChips 5590eb2
Merge pull request #2 from PiquelChips/Fix
PiquelChips cc16f2f
remove adding tags on merge
PiquelChips 8ccbae5
feat: add merging of milestone branch into master on milestone close
PiquelChips aa5ea48
feat: combined all build and test workflows
PiquelChips ecc0195
fix: clean up workflows and translate
PiquelChips a7abbaa
feat: merge PR into milestone branch
PiquelChips 07c5977
Merge pull request #3 from PiquelChips/feat
PiquelChips 44c55a9
Plus de tests
PiquelChips 2699f08
Merge pull request #4 from PiquelChips/PiquelChips-patch-1
PiquelChips 6e57a3f
Merge PR #4 into milestone-Yippeeeee
actions-user cdfa758
Update README.md (#5)
PiquelChips 5fdeaf5
Merge PR #5 into milestone-Yippeeeee
actions-user 7143566
remove pr-close workflow
PiquelChips 1d8d0bc
feat: check if target branch is correct
PiquelChips e7659c2
fix typo
PiquelChips d474e0c
fix typo
PiquelChips 0260180
Feat (#7)
PiquelChips c5a43ac
Merge milestone branch milestone-Yippeeeee into master upon milestone…
actions-user 9799b53
clean check-milestone
PiquelChips 6aeda2d
feat: milestone-create workflow
PiquelChips 51afec7
feat: add deleting branch when milestone-closed
PiquelChips 09f9d95
clean up milestone workflows
PiquelChips 2f2a890
Merge branch 'master' into feat
PiquelChips b95eb27
Feat (#8)
PiquelChips d87e9cd
fix: wrong branch name
PiquelChips 4a7c6bb
Merge branch 'master' into feat
PiquelChips f6f74ee
Feat (#9)
PiquelChips ca63894
fix: naming of jar in release workflow
PiquelChips 71e3a06
feat: clean pr template
PiquelChips 8e1c3f5
feat: workflows.md to explain the pipeline
PiquelChips f7e8484
fix: naming of jar in release workflow
PiquelChips bada03e
feat: clean pr template
PiquelChips 6115c5d
feat: workflows.md to explain the pipeline
PiquelChips 7b9ced3
fix: check-milestone had suplicated code
PiquelChips 7104f09
remove test
PiquelChips 93a5384
feat: simplified pipeline
PiquelChips 0436f05
Merge branch 'master' into feat
PiquelChips 22b2860
fix typos (I hope)
PiquelChips c62603b
feat: add automatic release notes generation
PiquelChips 1cbc39d
Merge branch 'master' into feat
PiquelChips 04236f0
translated release.yml
PiquelChips dd31342
remove unnecessary step in PR template
PiquelChips 4bf7594
fix: version numbre not being set properly in plugin.yml
PiquelChips 7287a4d
Merge branch 'master' into feat
PiquelChips 4d2d8f2
feat: removed unneccessary workflows
PiquelChips 379704b
feat: release posted on discord
PiquelChips 976da08
Merge branch 'ServerOpenMC:master' into feat
PiquelChips 095d907
fix checkout version for discord notif
PiquelChips bf834ca
change actions version
PiquelChips 5fc254f
fix: change @ in discord notification
PiquelChips abe39f8
simplify workflows
PiquelChips 0f35c95
Feat (#14)
PiquelChips 1ad3c11
add configuration of git in milestone-close
PiquelChips bd7cae3
Merge branch 'master' into feat
PiquelChips aefd35d
Feat (#15)
PiquelChips 37df85d
fix: tag name in milestone-close
PiquelChips 01c7acd
Merge pull request #16 from PiquelChips/feat
PiquelChips ec6e4b0
improve milestone-close release-create
PiquelChips 644322b
fix: wrong filepath for release
PiquelChips 41d9449
undo last thing
PiquelChips 8d65623
Merge pull request #17 from PiquelChips/feat
PiquelChips a7da410
removed old stuff from milestone-close
PiquelChips e58e49c
feat: simplify tag system
PiquelChips 7e97d9b
Merge pull request #18 from PiquelChips/feat
PiquelChips cf44594
feat: add tagless binary to release
PiquelChips 488b279
feat: add deploy to server to milestone-close
PiquelChips ca074a2
fix branding of discord release
PiquelChips 7d1bc73
feat: join message with milestone url
PiquelChips 51eb021
fix: error expanding version and milestone url in build.gradle
PiquelChips ad1156c
fix: token used for milestone-close release
PiquelChips 3240f32
Merge branch 'master' into feat
PiquelChips 2958f79
Merge pull request #19 from PiquelChips/feat
PiquelChips fee5c0a
Merge branch 'ServerOpenMC:master' into feat
PiquelChips ed7fed3
feat: name format verification
PiquelChips 2823866
feaet: remove . from file name
PiquelChips 5ce911d
Merge pull request #20 from PiquelChips/feat
PiquelChips 1316e99
fix name check
PiquelChips 94b313d
Merge pull request #21 from PiquelChips/feat
PiquelChips 537ddd3
fix name check
PiquelChips b500793
Merge pull request #22 from PiquelChips/feat
PiquelChips e1705a7
fix regex pattern
PiquelChips 235f4b4
Merge pull request #23 from PiquelChips/feat
PiquelChips 131f1f8
fix: build.gradle naming scheme
PiquelChips 6e66e11
Merge pull request #24 from PiquelChips/master
PiquelChips f583ccd
fix tag system
PiquelChips f1ec108
fix indentation
PiquelChips 62ad36e
fix: welcome message
PiquelChips b47742c
feat: /omcrestart
PiquelChips e716ff6
fix: dont restart pterodactyl server
PiquelChips a2a4bc6
feat: make restart work in console properly
PiquelChips 126bc5e
Merge branch 'master' into feat
PiquelChips 41f99e2
feat: modifie regex for more patters + explain error
PiquelChips e2602a4
feat: only console can send the message
PiquelChips d7b4c40
translate discord release
PiquelChips 708c6db
Merge branch 'ServerOpenMC:master' into feat
PiquelChips 5beab1b
fix translattion
PiquelChips c0b863a
feat: add sending console command on release
PiquelChips 75e816a
fix regex
PiquelChips 354c51f
fix regex
PiquelChips e9993f9
use ServerOpenMC action for pterodactyl upload
PiquelChips 981d20d
Merge branch 'ServerOpenMC:master' into feat
PiquelChips File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,14 +1,17 @@ | ||
| ## Pour que votre Pull Request soit accepté, il vous faut : | ||
| * Votre code suit-il le [Code de Conduite](https://github.com/ServerOpenMC/PluginV2/blob/master/CODE_OF_CONDUCT.md) ? : | ||
| * Avez-vous supprimé au maximum les imports non utilisés ? : | ||
| * Avez-vous commentez vos méthodes pour une meilleure lisibilité ? : | ||
| * Fournissez un Profileur (/spark profiler) lorsque vous éxécuter vos commandes, méthodes : | ||
|
|
||
| * Les Issues corrigé(e)s/en commun : | ||
| ## Petit résumé de la PR: | ||
|
|
||
| ## Étape nécessaire afin que la PR soit fini (si PR en draft) | ||
| <!-- *mettez des checkbox `- []` et les cocher lorsque les taches sont finies* --> | ||
| <!-- *ex. - [] Enlever tous les imports non utilisé* --> | ||
| <!-- *ex. - [] Enlever tous les imports non utilisés* --> | ||
|
|
||
| - [ ] Suivre le [Code de Conduite](https://github.com/ServerOpenMC/PluginV2/blob/master/CODE_OF_CONDUCT.md) | ||
| - [ ] Enlever tous les imports non utilisés | ||
| - [ ] Bien documenter la feature | ||
| - [ ] Fournir un profileur (si besoin/demandé par un admin) | ||
| - [ ] Avoir une milestone associée à la PR | ||
| - [ ] Valider tout les checks | ||
|
|
||
| * Les Issues corrigée(s) en commun : | ||
|
|
||
| ## Decrivez vos changements | ||
| <!-- *Clairement et avec des screenshots si nécessaires* --> |
This file contains hidden or 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,14 @@ | ||
| changelog: | ||
| categories: | ||
| - title: Nouvelles Fonctionnalités | ||
| labels: | ||
| - "🆙 Amélioration" | ||
| - ":arrows_counterclockwise: Changement" | ||
| - ":package: Features" | ||
| - title: Bugs et Optimisations | ||
| labels: | ||
| - "⚡Optimisation" | ||
| - ":sparkles: Fixes" | ||
| - title: Autre | ||
| labels: | ||
| - "*" |
This file contains hidden or 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,75 @@ | ||
| name: Build & Test | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths-ignore: | ||
| - '.github/**' | ||
| - '.gitignore' | ||
| - 'LICENSE' | ||
| - 'README.md' | ||
| push: | ||
| paths-ignore: | ||
| - '.github/**' | ||
| - '.gitignore' | ||
| - 'LICENSE' | ||
| - 'README.md' | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 21 | ||
|
|
||
| - name: Make gradlew executable | ||
| run: chmod +x ./gradlew | ||
|
|
||
| - name: Run Tests with Gradle | ||
| run: ./gradlew test | ||
|
|
||
| - name: Report test results | ||
| uses: dorny/test-reporter@v2 | ||
| if: always() | ||
| with: | ||
| name: Gradle Tests | ||
| path: build/test-results/test/*.xml | ||
| reporter: java-junit | ||
| fail-on-error: true | ||
|
|
||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| permissions: write-all | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 21 | ||
|
|
||
| - name: Make gradlew executable | ||
| run: chmod +x ./gradlew | ||
|
|
||
| - name: Build with snapshot version | ||
| env: | ||
| SNAPSHOT: true | ||
| GITHUB_SHA: ${{ github.sha }} | ||
| run: ./gradlew jar | ||
|
|
||
| - name: Upload Plugin jar | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: OpenMC-${{ github.sha }} | ||
| path: builds/ | ||
This file contains hidden or 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,17 @@ | ||
| name: Milestone Check | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, edited, reopened, synchronize] | ||
|
|
||
| jobs: | ||
| check-milestone: | ||
| name: Milestone check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Verify that PR has been assigned a milestone | ||
| run: | | ||
| if [ "${{ github.event.pull_request.milestone }}" == "" ]; then | ||
| echo "❌ PR has not been assigned a milestone." | ||
| exit 1 | ||
| fi |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,70 @@ | ||
| name: Handle closing a milestone | ||
|
|
||
| on: | ||
| milestone: | ||
| types: [closed] | ||
|
|
||
| jobs: | ||
| build-release: | ||
| name: Release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Verify Milestone Name | ||
| run: | | ||
| if [[ ! "${{ github.event.milestone.title }}" =~ ^[a-zA-Z0-9_\.\-]+$ ]]; then | ||
| echo "Name '${{ github.event.milestone.title }}' is not valid" | ||
| echo "It should only contain letters (a-z & A-Z), numbers (0-9), periods (.), dashes (-) and underscores (_)" | ||
| exit 1 | ||
| fi | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Make gradlew executable | ||
| run: chmod +x ./gradlew | ||
| - name: Build with Gradle | ||
| run: | | ||
| VERSION=$(echo ${{ github.event.milestone.title }} | tr "." "_") | ||
| ./gradlew shadowJar | ||
| cp ./builds/OpenMC.jar ./builds/OpenMC-$VERSION.jar | ||
| env: | ||
| TAG: ${{ github.event.milestone.title }} | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: OpenMC-${{ github.event.milestone.title }} | ||
| path: builds/ | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ github.event.milestone.title }} | ||
| name: Release milestone ${{ github.event.milestone.title }} | ||
| generate_release_notes: true | ||
| fail_on_unmatched_files: true | ||
| make_latest: true | ||
| body: | | ||
| # Mise à jour ${{ github.event.milestone.title }} | ||
|
|
||
| ${{ github.event.milestone.description }} | ||
iambibi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Cette mise à jour à été créée automatiquement a la fermeture de la milsetone "${{ github.event.milestone.title }}". | ||
| files: builds/** | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
|
|
||
| - name: Deploy to server | ||
PiquelChips marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| uses: ServerOpenMC/pterodactyl-upload-action@v2.5 | ||
| with: | ||
| panel-host: ${{ secrets.PANEL_HOST }} | ||
| api-key: ${{ secrets.API_KEY }} | ||
| server-id: ${{ secrets.SERVER_ID }} | ||
| source: builds/OpenMC.jar | ||
| target: "./plugins/OpenMC.jar" | ||
| command: omcrestart | ||
This file contains hidden or 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,25 @@ | ||
| name: Release to Discord | ||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| github-releases-to-discord: | ||
| runs-on: ubuntu-latest | ||
| name: Release to Discord | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Github Releases To Discord | ||
| uses: SethCohen/github-releases-to-discord@v1.16.2 | ||
| with: | ||
| webhook_url: ${{ secrets.WEBHOOK_URL }} | ||
| color: "16021398" # decimal of #f47796 | ||
| username: "Mise à jour de OpenMC" | ||
| avatar_url: "https://raw.githubusercontent.com/ServerOpenMC/.github/refs/heads/master/brandkit/logo.png" | ||
| #content: "||<@&1258420105209974804>||" | ||
| footer_title: "Changements" | ||
| footer_icon_url: "https://raw.githubusercontent.com/ServerOpenMC/.github/refs/heads/master/brandkit/logo.png" | ||
| footer_timestamp: true | ||
| max_description: '16384' | ||
| reduce_headings: true |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.