Afdian Sponsors #116
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
# Copyright 2024, MCSL Team, mailto:[email protected] | |
# | |
# Part of "MCSL2", a simple and multifunctional Minecraft server launcher. | |
# | |
# Licensed under the GNU General Public License, Version 3.0, with our | |
# additional agreements. (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://github.com/MCSLTeam/MCSL2/raw/master/LICENSE | |
# | |
################################################################################ | |
name: Afdian Sponsors | |
permissions: write-all | |
on: | |
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: master # 注意修改为你的分支, 例如: master | |
- name: Afdian action | |
uses: yiyungent/afdian-action@main | |
with: | |
# 在 Settings->Secrets 配置 AFDIAN_USERID, AFDIAN_TOKEN | |
# 爱发电 user_id | |
afdian_userId: ${{ secrets.AFDIAN_USERID }} | |
# 爱发电 token | |
afdian_token: ${{ secrets.AFDIAN_TOKEN }} | |
# 默认为: .github/afdian-action.cshtml | |
template_filePath: ".github/afdian-action.cshtml" | |
# 默认为: README.md | |
target_filePath: "Sponsors.md" | |
# 可省, 高级选项: RazorEngine Complie, 在 cshtml 中需要 using 的 namespace, 多个用 ; 隔开 | |
usings: "" | |
# 可省, 高级选项: RazorEngine Complie, 在 cshtml 中需要添加的 系统引用, 多个用 ; 隔开 | |
# 例如: assemblyReferences: "System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | |
assemblyReferences: "" | |
# 下方为 直接 push 到目标分支, 当然你也可以选择 Pull Request 方式 | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "U | 爱发电赞助" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master # https://github.com/ad-m/github-push-action | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: master # 注意修改为你的分支, 例如: master |