Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonic853 committed Aug 15, 2024
1 parent 5b1c6bd commit 9fa2e2e
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Check and Publish Version

on:
push:
branches:
- main
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
id-token: write

jobs:
publish:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Bump version
id: read_version
run: |
git fetch --tags
last_tag=$(git describe --tags --abbrev=0 || echo "0.0.0")
current_version=$(npm pkg get version --workspaces=false | tr -d \")
name=$(npm pkg get name --workspaces=false | tr -d \")
echo "last_tag=$last_tag" >> $GITHUB_OUTPUT
echo "current_version=$current_version" >> $GITHUB_OUTPUT
echo "name=$name" >> $GITHUB_OUTPUT
- name: Create Tag
if: steps.read_version.outputs.last_tag != steps.read_version.outputs.current_version
uses: rickstaa/action-create-tag@v1
with:
tag: "${{ steps.read_version.outputs.current_version }}"

- name: Create ZIP archive
if: steps.read_version.outputs.last_tag != steps.read_version.outputs.current_version
run: |
zip -r ${{ steps.read_version.outputs.name }}.zip . -x ".git*" ".github*"
- name: Release
if: steps.read_version.outputs.last_tag != steps.read_version.outputs.current_version
uses: softprops/action-gh-release@v2
with:
body: |
### **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.read_version.outputs.last_tag }}...${{ steps.read_version.outputs.current_version }}
# Installation method (VCC):
Click the "Add Repository" button under Settings → Packages and enter the following URL:
https://page.853lab.com/vpm-repos/vpm.json
# 安装方法(VCC):
在 Settings → Packages 下点击“Add Repository”按钮后输入以下URL:
https://page.853lab.com/vpm-repos/vpm.json
随后在项目添加“Udon Array Plus”包。
## License restrictions 许可限制
Non-Mainland China (except China Hong Kong, China Macau, and China Taiwan) individuals or companies are subject to an LGPL license.
非中国大陆地区(中国香港、中国澳门和中国台湾除外)的个人或公司须遵守 LGPL 许可证。
Individuals or companies in mainland China (except China Hong Kong, China Macau, and China Taiwan) are prohibited from using this LGPL license and using this repository and products if the following circumstances apply:
中国大陆地区(中国香港、中国澳门和中国台湾除外)的个人或公司如含有以下任一情况禁止使用该 LGPL 许可并禁止使用此储存库以及商品(包括此储存库以及商品的任一文件):
1. 以公司、社团、社区名义创建的地图/世界
2. 地图/世界参与制作人数超过 2 人以上(不含 2 人)
3. 由 Sonic853 明确禁止的个人用户、公司
如需获得使用此储存库以及商品的授权,请联系作者 Sonic853 ([email protected]) 获取授权或访问 [爱发电](https://afdian.com/a/Sonic853) 手动获取授权。
tag_name: ${{ steps.read_version.outputs.current_version }}
files: ${{ steps.read_version.outputs.name }}.zip

0 comments on commit 9fa2e2e

Please sign in to comment.