Publish Plugin #3
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
| name: Publish Plugin | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Set Version | |
| id: set-version | |
| run: | |
| echo "version=`egrep -o "version>(.*)</version" install.xml | egrep -o \"[0-9.]*\"`" >> $GITHUB_OUTPUT | |
| - name: Zip Repository | |
| id: zip | |
| run: zip NonLatinForSBClassic -r *.pm install.xml strings.txt *.ttf README.md License.txt | |
| - name: Update SHA and Version in repo.xml | |
| id: tag | |
| run: | | |
| url="https://github.com/${{ github.repository }}/releases/download/${{ steps.set-version.outputs.version }}" | |
| python3 repo/release.py repo/repo.xml ${{ steps.set-version.outputs.version }} NonLatinForSBClassic.zip $url | |
| - name: Update Repository | |
| run: | | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| git add repo/repo.xml | |
| git commit -m "Update repo.xml for release ${{ steps.set-version.outputs.version }}" | |
| git push origin HEAD:main | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v3 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.set-version.outputs.version }} | |
| name: Version ${{ steps.set-version.outputs.version }} | |
| body: NonLatinForSBClassic Plugin Release | |
| draft: false | |
| prerelease: false | |
| files: NonLatinForSBClassic.zip | |