From e4ed72079492919728854b6eb4b03c02bfc4e756 Mon Sep 17 00:00:00 2001 From: DMB-codegang-Mac <84826021+DMB-codegang@users.noreply.github.com> Date: Tue, 30 Jun 2026 23:12:50 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0Gitea=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81=E5=92=8C=E5=88=9D?= =?UTF-8?q?=E5=A7=8BIDEA=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 配置Gitea Actions实现main分支推送时自动打包并发布modpack,同时添加IntelliJ IDEA项目基础配置 --- .gitea/workflows/updateR2.yaml | 32 ++++++++++++++++++++++++++++++++ .idea/.gitignore | 10 ++++++++++ .idea/mcmtrdy.iml | 8 ++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ 5 files changed, 64 insertions(+) create mode 100644 .gitea/workflows/updateR2.yaml create mode 100644 .idea/.gitignore create mode 100644 .idea/mcmtrdy.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.gitea/workflows/updateR2.yaml b/.gitea/workflows/updateR2.yaml new file mode 100644 index 0000000..841b163 --- /dev/null +++ b/.gitea/workflows/updateR2.yaml @@ -0,0 +1,32 @@ +name: Release Modpack + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create modpack archive + run: | + mkdir -p dist + zip -r dist/mcmtrdy-modpack.zip server-manifest.json overrides/ + + - name: Generate release tag + id: tag + run: | + echo "tag=$(date +'%Y%m%d-%H%M%S')-${GITHUB_SHA::7}" >> $GITHUB_OUTPUT + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.tag.outputs.tag }} + name: Modpack ${{ steps.tag.outputs.tag }} + files: dist/mcmtrdy-modpack.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..f6906f2 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# 已忽略包含查询文件的默认文件夹 +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/mcmtrdy.iml b/.idea/mcmtrdy.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/mcmtrdy.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..5d779ed --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file