-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: 👷 upgrade release-please-action
- Loading branch information
1 parent
0f6241d
commit 39a55ee
Showing
5 changed files
with
112 additions
and
117 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 |
---|---|---|
@@ -1,100 +1,71 @@ | ||
name: Release Please | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
change-finder: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
name: Change Finder | ||
name: Release Please | ||
|
||
outputs: | ||
changed: ${{ steps.find.outputs.changed }} | ||
plugins: ${{ steps.find.outputs.plugins }} | ||
releases_created: ${{ steps.release-please.outputs.releases_created }} | ||
tag_name: ${{ steps.release-please.outputs[format('{0}--tag_name', steps.set-outputs.outputs.path)] }} | ||
path: ${{ steps.set-outputs.outputs.path }} | ||
|
||
steps: | ||
- name: Check Out | ||
uses: actions/checkout@v3 | ||
- name: Release Please | ||
uses: google-github-actions/release-please-action@v4 | ||
id: release-please | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }} | ||
config-file: .release-please/release-please-config.json | ||
manifest-file: .release-please/.release-please-manifest.json | ||
|
||
- name: Find | ||
id: find | ||
- name: Set Outputs | ||
id: set-outputs | ||
run: | | ||
npm i @actions/core | ||
node changeFinder.js | ||
release-please-pr: | ||
runs-on: ubuntu-latest | ||
name: Release Please PR | ||
needs: | ||
- change-finder | ||
- release-please-release | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
plugin: ${{ fromJson(needs.change-finder.outputs.plugins) }} | ||
echo "path=${{ fromJson(steps.release-please.outputs.paths_released)[0] }}" >> $GITHUB_OUTPUT | ||
echo "${{ fromJson(steps.release-please.outputs.paths_released)[0] }}" | ||
steps: | ||
- name: Release Please PR | ||
uses: google-github-actions/release-please-action@v3 | ||
with: | ||
release-type: simple | ||
package-name: ${{ matrix.plugin }} | ||
path: ${{ matrix.plugin }} | ||
monorepo-tags: true | ||
command: release-pr | ||
pull-request-title-pattern: 'chore${scope}: 🔖 release${component} ${version}' | ||
- if: ${{ steps.release-please.outputs.releases_created == 'true' }} | ||
run: | | ||
echo "${{ steps.set-outputs.outputs.path }}" | ||
release-please-release: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Release Please Release | ||
needs: change-finder | ||
if: ${{ needs.change-finder.outputs.changed == 'true' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
plugin: ${{ fromJson(needs.change-finder.outputs.plugins) }} | ||
name: Build | ||
needs: release-please | ||
if: ${{ needs.release-please.outputs.releases_created == 'true' }} | ||
|
||
steps: | ||
- name: Release Please Release | ||
uses: google-github-actions/release-please-action@v3 | ||
id: release_please_release | ||
with: | ||
release-type: simple | ||
package-name: ${{ matrix.plugin }} | ||
path: ${{ matrix.plugin }} | ||
monorepo-tags: true | ||
command: github-release | ||
pull-request-title-pattern: 'chore${scope}: 🔖 release${component} ${version}' | ||
- run: | | ||
echo "${{ needs.release-please.outputs.releases_created }}" | ||
echo "${{ needs.release-please.outputs.tag_name }}" | ||
echo "${{ needs.release-please.outputs.path }}" | ||
- name: Check Out | ||
uses: actions/checkout@v3 | ||
if: ${{ steps.release_please_release.outputs[format('{0}--release_created', matrix.plugin)] }} | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
if: ${{ steps.release_please_release.outputs[format('{0}--release_created', matrix.plugin)] }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
python-version: '3.12' | ||
|
||
- name: Install Dependencies | ||
if: ${{ steps.release_please_release.outputs[format('{0}--release_created', matrix.plugin)] }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install mcdreforged | ||
- name: Pack | ||
id: pack | ||
if: ${{ steps.release_please_release.outputs[format('{0}--release_created', matrix.plugin)] }} | ||
run: | | ||
python -m mcdreforged pack --ignore-patterns __pycache__ -i ${{ matrix.plugin }} | ||
mcdreforged pack --ignore-patterns __pycache__ -i ${{ needs.release-please.outputs.path }} | ||
echo "name=$(ls *.mcdr)" >> $GITHUB_OUTPUT | ||
- name: Upload | ||
if: ${{ steps.release_please_release.outputs[format('{0}--release_created', matrix.plugin)] }} | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release upload ${{ steps.release_please_release.outputs[format('{0}--tag_name', matrix.plugin)] }} ${{ steps.pack.outputs.name }} | ||
gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ steps.pack.outputs.name }} |
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,18 @@ | ||
{ | ||
"src/advanced_calculator": "0.3.1", | ||
"src/bingo": "0.0.3", | ||
"src/bot": "1.1.2", | ||
"src/database_api": "0.1.1", | ||
"src/dict_command_registration": "1.1.0", | ||
"src/fastapi_mcdr": "1.0.0", | ||
"src/gamemode": "1.1.0", | ||
"src/info": "0.2.0", | ||
"src/let_me_click_and_send": "1.0.0", | ||
"src/lowercase_mcdr_command": "1.2.2", | ||
"src/minecraft_command_register": "1.7.3", | ||
"src/more_command_nodes": "1.1.0", | ||
"src/online_player_api": "1.0.0", | ||
"src/qq_api": "1.3.1", | ||
"src/qq_chat": "2.1.0", | ||
"src/uuid_api": "0.1.2" | ||
} |
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,62 @@ | ||
{ | ||
"release-type": "simple", | ||
"pull-request-title-pattern": "chore${scope}: 🔖 release${component} ${version}", | ||
"extra-files": [ | ||
{ | ||
"type": "json", | ||
"path": "mcdreforged.plugin.json", | ||
"jsonpath": "$.version" | ||
} | ||
], | ||
"separate-pull-requests": true, | ||
"packages": { | ||
"src/advanced_calculator": { | ||
"package-name": "advanced_calculator" | ||
}, | ||
"src/bingo": { | ||
"package-name": "bingo" | ||
}, | ||
"src/bot": { | ||
"package-name": "bot" | ||
}, | ||
"src/database_api": { | ||
"package-name": "database_api" | ||
}, | ||
"src/dict_command_registration": { | ||
"package-name": "dict_command_registration" | ||
}, | ||
"src/fastapi_mcdr": { | ||
"package-name": "fastapi_mcdr" | ||
}, | ||
"src/gamemode": { | ||
"package-name": "gamemode" | ||
}, | ||
"src/info": { | ||
"package-name": "info" | ||
}, | ||
"src/let_me_click_and_send": { | ||
"package-name": "let_me_click_and_send" | ||
}, | ||
"src/lowercase_mcdr_command": { | ||
"package-name": "lowercase_mcdr_command" | ||
}, | ||
"src/minecraft_command_register": { | ||
"package-name": "minecraft_command_register" | ||
}, | ||
"src/more_command_nodes": { | ||
"package-name": "more_command_nodes" | ||
}, | ||
"src/online_player_api": { | ||
"package-name": "online_player_api" | ||
}, | ||
"src/qq_api": { | ||
"package-name": "qq_api" | ||
}, | ||
"src/qq_chat": { | ||
"package-name": "qq_chat" | ||
}, | ||
"src/uuid_api": { | ||
"package-name": "uuid_api" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.