-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.77 KB
/
dotnetcore.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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 '[email protected]'
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