chore(master): π release bot 1.2.0 (#182) #325
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
name: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
name: Release Please | |
outputs: | |
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: Release Please | |
uses: google-github-actions/release-please-action@v4 | |
id: release-please | |
with: | |
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }} | |
config-file: .release-please/release-please-config.json | |
manifest-file: .release-please/.release-please-manifest.json | |
- name: Set Outputs | |
id: set-outputs | |
run: | | |
echo "path=${{ fromJson(steps.release-please.outputs.paths_released)[0] }}" >> $GITHUB_OUTPUT | |
echo "${{ fromJson(steps.release-please.outputs.paths_released)[0] }}" | |
- if: ${{ steps.release-please.outputs.releases_created == 'true' }} | |
run: | | |
echo "${{ steps.set-outputs.outputs.path }}" | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
needs: release-please | |
if: ${{ needs.release-please.outputs.releases_created == 'true' }} | |
steps: | |
- 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@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install mcdreforged | |
- name: Pack | |
id: pack | |
run: | | |
mcdreforged pack --ignore-patterns __pycache__ -i ${{ needs.release-please.outputs.path }} | |
echo "name=$(ls *.mcdr)" >> $GITHUB_OUTPUT | |
- name: Upload | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ steps.pack.outputs.name }} |