2023-05-24 08:46:28 +00:00
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
# Sequence of patterns matched against refs/tags
|
|
|
|
|
tags:
|
|
|
|
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
|
|
|
|
|
|
name: Create Release And Upload assets
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
create-release:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2023-06-15 03:19:52 +00:00
|
|
|
|
- name: Checkout Code
|
2024-06-05 08:58:09 +00:00
|
|
|
|
uses: actions/checkout@v4
|
2023-05-25 08:46:39 +00:00
|
|
|
|
- name: Setup Node
|
2024-06-05 08:58:09 +00:00
|
|
|
|
uses: actions/setup-node@v4
|
2023-05-24 08:46:28 +00:00
|
|
|
|
with:
|
2024-02-22 07:23:20 +00:00
|
|
|
|
node-version: '20.2'
|
2023-05-24 08:46:28 +00:00
|
|
|
|
- name: Build Web
|
|
|
|
|
run: |
|
2023-06-15 03:19:52 +00:00
|
|
|
|
cd frontend && npm install && npm run build:pro
|
2023-05-24 08:46:28 +00:00
|
|
|
|
env:
|
|
|
|
|
NODE_OPTIONS: --max-old-space-size=8192
|
2023-05-25 08:46:39 +00:00
|
|
|
|
- name: Setup Go
|
2024-06-05 08:58:09 +00:00
|
|
|
|
uses: actions/setup-go@v5
|
2023-05-24 08:46:28 +00:00
|
|
|
|
with:
|
2024-11-18 03:33:25 +00:00
|
|
|
|
go-version: '1.23'
|
2023-05-24 08:46:28 +00:00
|
|
|
|
- name: Build Release
|
2024-06-05 08:58:09 +00:00
|
|
|
|
uses: goreleaser/goreleaser-action@v6
|
2023-05-24 08:46:28 +00:00
|
|
|
|
with:
|
2023-06-15 03:19:52 +00:00
|
|
|
|
distribution: goreleaser
|
2024-11-19 03:56:05 +00:00
|
|
|
|
version: '~> v2'
|
2024-06-05 08:58:09 +00:00
|
|
|
|
args: release --skip=publish --clean
|
2023-05-24 08:46:28 +00:00
|
|
|
|
- name: Upload Assets
|
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
|
with:
|
|
|
|
|
draft: true
|
2023-06-15 03:19:52 +00:00
|
|
|
|
body: |
|
|
|
|
|
# 一、安装和升级
|
|
|
|
|
|
|
|
|
|
## 1.1 一键安装
|
|
|
|
|
```sh
|
|
|
|
|
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 1.2 在线升级
|
|
|
|
|
|
|
|
|
|
登录 1Panel Web 控制台,在页面右下角点击 **【检查更新】** 进行在线升级。
|
|
|
|
|
|
|
|
|
|
>更多信息请查阅在线文档:https://1panel.cn/docs/
|
|
|
|
|
|
|
|
|
|
# 二、更新日志
|
|
|
|
|
|
2023-05-24 08:46:28 +00:00
|
|
|
|
files: |
|
|
|
|
|
dist/*.tar.gz
|
|
|
|
|
dist/checksums.txt
|
2023-06-09 02:47:09 +00:00
|
|
|
|
- name: Setup OSSUTIL
|
2024-11-18 03:33:25 +00:00
|
|
|
|
uses: yizhoumo/setup-ossutil@v2
|
2023-06-09 02:47:09 +00:00
|
|
|
|
with:
|
|
|
|
|
endpoint: ${{ secrets.OSS_ENDPOINT }}
|
|
|
|
|
access-key-id: ${{ secrets.OSS_ACCESS_KEY_ID }}
|
|
|
|
|
access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
|
2024-11-18 03:33:25 +00:00
|
|
|
|
ossutil-version: '1.7.18'
|
2023-06-09 02:47:09 +00:00
|
|
|
|
- name: Upload Assets to OSS
|
2023-06-15 03:19:52 +00:00
|
|
|
|
run: ossutil cp -r dist/ oss://resource-fit2cloud-com/1panel/package/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --only-current-dir --force
|