Merge pull request #89 from Controllerdestiny/main #5
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: NET | |
on: | |
push: | |
branches: [ "master","cai"] | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Initialize .NET 6 | |
uses: actions/setup-dotnet@v3 | |
env: | |
DOTNET_CLI_UI_LANGUAGE: zh-CN | |
with: | |
dotnet-version: 6.0.x | |
- name: Build Plugin | |
run: | | |
dotnet build Plugin.sln -c Release | |
- name: Initialize Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install Pandoc | |
run: | |
sudo apt-get install pandoc | |
env: | |
PYTHONIOENCODING: 'utf-8' | |
- name: Install TeX Live | |
run: | | |
sudo apt-get install -y texlive-xetex | |
- name: Package | |
run: | |
sudo python BuildHelper.py Release | |
env: | |
PYTHONIOENCODING: 'utf-8' | |
- name: Temporary Upload Plugin | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Plugins | |
path: Plugins.zip | |
- name: Prepare Release Files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Plugins | |
path: Plugins.zip | |
LatestRelease: | |
name: Latest Release | |
runs-on: ubuntu-latest | |
needs: Build | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get Changelog | |
id: external_changelog_second | |
uses: mikepenz/release-changelog-builder-action@v4 | |
with: | |
configuration: "Config/Config_Rep.json" | |
#cache: ${{ steps.external_changelog_collect.outputs.cache }} | |
- name: Echo External Repo Configuration Changelog | |
env: | |
CHANGELOG: ${{ steps.external_changelog_second.outputs.changelog }} | |
CHANGELOG_SECOND: ${{ steps.external_changelog_second.outputs.changelog }} | |
run: | | |
echo ${{ steps.external_changelog_collect.outputs.cache }} | |
echo "First:" | |
echo "$CHANGELOG" | |
echo "Second:" | |
echo "$CHANGELOG_SECOND" | |
- name: Update Tag | |
run: | | |
git tag -f V1.0.0.0 | |
git push -f origin V1.0.0.0 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: Plugins | |
path: ./bin | |
- name: Update Latest Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: V1.0.0.0 | |
name: "Latest Version" | |
body: "🚀 每次仓库更新,我们都会在这里发布最新的Release。请注意,这个仓库只有一个Release,所以你总是能在这里找到最新的版本。\n📦 你可以在页面的最底部找到插件包的下载链接。下载完成后,你需要使用ZIP压缩工具进行解压。\n${{steps.external_changelog_second.outputs.changelog}}" | |
artifacts: | | |
./bin/* | |
allowUpdates: true | |
removeArtifacts: true | |
ClearTempArtifacts: | |
name: Clear Temp Artifacts | |
if: always() | |
runs-on: ubuntu-latest | |
needs: | |
- LatestRelease | |
permissions: | |
actions: write | |
steps: | |
- uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: | | |
Plugins |