Release TeleJelly Plugin #19
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 TeleJelly Plugin | |
# TODO: rename file | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.x' | |
- name: Build Plugin | |
run: | | |
dotnet tool restore | |
version=$(dotnet tool run minver) | |
echo "version=$version" >> $GITHUB_ENV | |
dotnet publish TeleJelly -c Release | |
- name: Publish Manifest | |
run: | | |
git config --global user.name 'TeleJelly-Release-bot' | |
git config --global user.email 'TeleJelly-Release-bot@users.noreply.github.com' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY} | |
git checkout --orphan dist | |
git rm -rf . | |
git add manifest.json | |
git commit -m "Auto added v${{env.version}} by Github Actions" | |
git push -f -u origin dist | |
- name: Publish Release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body: | | |
_Automatic Release by Github Actions_ | |
The [Repository manifest URL](https://raw.githubusercontent.com/hexxone/TeleJelly/dist/manifest.json) should now include this version as well. | |
draft: false | |
tag_name: ${{env.version}} | |
name: Release v${{env.version}} | |
append_body: true | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
make_latest: true | |
prerelease: ${{ contains(env.version, '-alpha') }} | |
files: | | |
./TeleJelly_v${{env.version}}.zip |