diff --git a/.github/workflows/add-labels-for-pr.yml b/.github/workflows/add-labels-for-pr.yml index 2b84d0094..b031f81c1 100644 --- a/.github/workflows/add-labels-for-pr.yml +++ b/.github/workflows/add-labels-for-pr.yml @@ -1,5 +1,5 @@ -on: pull_request name: General PR Handling for 1Panel +on: pull_request permissions: pull-requests: write jobs: diff --git a/.github/workflows/build-publish-to-oss.yml b/.github/workflows/build-publish-to-oss.yml index 8c62e084b..a429191d4 100644 --- a/.github/workflows/build-publish-to-oss.yml +++ b/.github/workflows/build-publish-to-oss.yml @@ -1,8 +1,8 @@ +name: Create Release And Upload assets on: push: tags: - 'v*' -name: Create Release And Upload assets jobs: create-release: runs-on: ubuntu-latest @@ -44,4 +44,4 @@ jobs: access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }} ossutil-version: '1.7.18' - name: Upload Assets to OSS - 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 + 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 diff --git a/.github/workflows/build-publish-to-r2.yml b/.github/workflows/build-publish-to-r2.yml new file mode 100644 index 000000000..fa906513e --- /dev/null +++ b/.github/workflows/build-publish-to-r2.yml @@ -0,0 +1,45 @@ +name: Create Release And Upload Cloudflare R2 +on: + push: + tags: + - 'v*' +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20.2' + - name: Build Web + run: | + cd frontend && npm install && npm run build:pro + env: + NODE_OPTIONS: --max-old-space-size=8192 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + - name: Build Release + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: release --skip=publish --clean + - name: Upload Assets + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + draft: true + files: | + dist/*.tar.gz + dist/checksums.txt + - name: Setup Rclone + uses: AnimMouse/setup-rclone@v1 + with: + rclone_config: ${{ secrets.RCLONE_CONFIG }} + - name: Upload to Cloudflare R2 + run: | + rclone copy dist/ cloudflare_r2:package/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --progress diff --git a/.github/workflows/issue-translator.yml b/.github/workflows/issue-translator.yml index f377a1f5f..11c94a586 100644 --- a/.github/workflows/issue-translator.yml +++ b/.github/workflows/issue-translator.yml @@ -1,4 +1,4 @@ -name: 'issue-translator' +name: Issue Translator on: issue_comment: types: [created] diff --git a/.github/workflows/sonarcloud-scan.yml b/.github/workflows/sonarcloud-scan.yml index 0569abb1e..80f24b7b9 100644 --- a/.github/workflows/sonarcloud-scan.yml +++ b/.github/workflows/sonarcloud-scan.yml @@ -1,4 +1,4 @@ -name: Build +name: SonarCloud Scan on: push: branches: diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml index 673dc554b..3b0ba0850 100644 --- a/.github/workflows/sync2gitee.yml +++ b/.github/workflows/sync2gitee.yml @@ -1,4 +1,4 @@ -name: sync2gitee +name: Synchronize to Gitee on: [push] jobs: repo-sync: