From 4339e856d399519404691050b3b7f1efed72f786 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Mon, 16 Jun 2025 00:40:04 +0800 Subject: [PATCH] Rename workflows and add headers --- ...aarch64.yml => build-on-Linux-AArch64.yml} | 19 +++++++++++---- ...nux-armv7.yml => build-on-Linux-ARMv7.yml} | 19 +++++++++++---- ...riscv64.yml => build-on-Linux-riscv64.yml} | 19 +++++++++++---- .../{linux-x64.yml => build-on-Linux-x64.yml} | 19 +++++++++++---- .../{windows.yml => build-on-Windows.yml} | 18 ++++++++++---- .../{macos.yml => build-on-macOS.yml} | 21 ++++++++++++---- .../{pkg-deb.yml => pkg-for-DEB.yml} | 4 ++-- ...el.yml => pub-AUR-chsrc-and-chsrc-bin.yml} | 22 +++++++++++++---- ...{pkg-aur-git.yml => pub-AUR-chsrc-git.yml} | 15 +++++++++--- .github/workflows/pub-WinGet.yml | 24 +++++++++++++++++++ .github/workflows/winget.yml | 13 ---------- 11 files changed, 145 insertions(+), 48 deletions(-) rename .github/workflows/{linux-aarch64.yml => build-on-Linux-AArch64.yml} (62%) rename .github/workflows/{linux-armv7.yml => build-on-Linux-ARMv7.yml} (62%) rename .github/workflows/{linux-riscv64.yml => build-on-Linux-riscv64.yml} (62%) rename .github/workflows/{linux-x64.yml => build-on-Linux-x64.yml} (50%) rename .github/workflows/{windows.yml => build-on-Windows.yml} (68%) rename .github/workflows/{macos.yml => build-on-macOS.yml} (66%) rename .github/workflows/{pkg-deb.yml => pkg-for-DEB.yml} (98%) rename .github/workflows/{pkg-aur-rel.yml => pub-AUR-chsrc-and-chsrc-bin.yml} (78%) rename .github/workflows/{pkg-aur-git.yml => pub-AUR-chsrc-git.yml} (62%) create mode 100644 .github/workflows/pub-WinGet.yml delete mode 100644 .github/workflows/winget.yml diff --git a/.github/workflows/linux-aarch64.yml b/.github/workflows/build-on-Linux-AArch64.yml similarity index 62% rename from .github/workflows/linux-aarch64.yml rename to .github/workflows/build-on-Linux-AArch64.yml index bc88add..5d367e5 100644 --- a/.github/workflows/linux-aarch64.yml +++ b/.github/workflows/build-on-Linux-AArch64.yml @@ -1,4 +1,15 @@ -name: Linux AArch64 Build +# --------------------------------------------------------------- +# Workflow File : build-on-Linux-AArch64.yml +# File Authors : Aoran Zeng +# Contributors : Nul None +# | +# Created On : <2023-09-14> +# Last Modified : <2025-03-06> +# +# Build chsrc on Linux (AArch64) and upload it to GitHub: the 'pre' release +# --------------------------------------------------------------- + +name: Build on Linux AArch64 on: push: branches: [ "gh-build" ] @@ -6,10 +17,10 @@ on: branches: [ "gh-build" ] jobs: - aarch64-linux-build-and-upload: + build-and-upload: runs-on: ubuntu-latest steps: - - name: Build aarch64 + - name: Build uses: uraimo/run-on-arch-action@v2 with: arch: aarch64 @@ -27,7 +38,7 @@ jobs: make CI CI_ARTIFACT_NAME=chsrc-aarch64-linux cp ./chsrc-aarch64-linux /artifacts - - name: Release + - name: Upload uses: softprops/action-gh-release@v1 with: tag_name: pre diff --git a/.github/workflows/linux-armv7.yml b/.github/workflows/build-on-Linux-ARMv7.yml similarity index 62% rename from .github/workflows/linux-armv7.yml rename to .github/workflows/build-on-Linux-ARMv7.yml index 6e007a0..48de249 100644 --- a/.github/workflows/linux-armv7.yml +++ b/.github/workflows/build-on-Linux-ARMv7.yml @@ -1,4 +1,15 @@ -name: Linux ARMv7 Build +# --------------------------------------------------------------- +# Workflow File : build-on-Linux-ARMv7.yml +# File Authors : Aoran Zeng +# Contributors : Nul None +# | +# Created On : <2023-09-14> +# Last Modified : <2025-03-06> +# +# Build chsrc on Linux (ARMv7) and upload it to GitHub: the 'pre' release +# --------------------------------------------------------------- + +name: Build on Linux ARMv7 on: push: branches: [ "gh-build" ] @@ -6,10 +17,10 @@ on: branches: [ "gh-build" ] jobs: - armv7-linu-build-and-upload: + build-and-upload: runs-on: ubuntu-latest steps: - - name: Build ARMv7 + - name: Build uses: uraimo/run-on-arch-action@v2 with: arch: armv7 @@ -27,7 +38,7 @@ jobs: make CI CI_ARTIFACT_NAME=chsrc-armv7-linux cp ./chsrc-armv7-linux /artifacts - - name: Release + - name: Upload uses: softprops/action-gh-release@v1 with: tag_name: pre diff --git a/.github/workflows/linux-riscv64.yml b/.github/workflows/build-on-Linux-riscv64.yml similarity index 62% rename from .github/workflows/linux-riscv64.yml rename to .github/workflows/build-on-Linux-riscv64.yml index bb29947..5ee1f82 100644 --- a/.github/workflows/linux-riscv64.yml +++ b/.github/workflows/build-on-Linux-riscv64.yml @@ -1,4 +1,15 @@ -name: Linux riscv64 Build +# --------------------------------------------------------------- +# Workflow File : build-on-Linux-riscv64.yml +# File Authors : Aoran Zeng +# Contributors : Nul None +# | +# Created On : <2023-09-14> +# Last Modified : <2025-03-06> +# +# Build chsrc on Linux (riscv64) and upload it to GitHub: the 'pre' release +# --------------------------------------------------------------- + +name: Build on Linux riscv64 on: push: branches: [ "gh-build" ] @@ -6,10 +17,10 @@ on: branches: [ "gh-build" ] jobs: - riscv64-linux-build-and-upload: + build-and-upload: runs-on: ubuntu-latest steps: - - name: Build riscv64 + - name: Build uses: uraimo/run-on-arch-action@v2 with: arch: riscv64 @@ -27,7 +38,7 @@ jobs: make CI CI_ARTIFACT_NAME=chsrc-riscv64-linux cp ./chsrc-riscv64-linux /artifacts - - name: Release + - name: Upload uses: softprops/action-gh-release@v1 with: tag_name: pre diff --git a/.github/workflows/linux-x64.yml b/.github/workflows/build-on-Linux-x64.yml similarity index 50% rename from .github/workflows/linux-x64.yml rename to .github/workflows/build-on-Linux-x64.yml index d170554..99dffd1 100644 --- a/.github/workflows/linux-x64.yml +++ b/.github/workflows/build-on-Linux-x64.yml @@ -1,4 +1,15 @@ -name: Linux x64 Build +# --------------------------------------------------------------- +# Workflow File : build-on-Linux-x64.yml +# File Authors : Aoran Zeng +# Contributors : Nul None +# | +# Created On : <2023-09-14> +# Last Modified : <2025-03-06> +# +# Build chsrc on Linux (x64) and upload it to GitHub: the 'pre' release +# --------------------------------------------------------------- + +name: Build on Linux x64 on: push: branches: [ "gh-build" ] @@ -6,21 +17,21 @@ on: branches: [ "gh-build" ] jobs: - x64-linux-build-and-upload: + build-and-upload: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v3 - - name: Compile chsrc x64 + - name: Build run: | make CI CI_ARTIFACT_NAME=chsrc-x64-linux - name: List files run: ls *-linux - - name: Release + - name: Upload uses: softprops/action-gh-release@v1 # if: startsWith(github.ref, 'refs/tags/') with: diff --git a/.github/workflows/windows.yml b/.github/workflows/build-on-Windows.yml similarity index 68% rename from .github/workflows/windows.yml rename to .github/workflows/build-on-Windows.yml index 114f1c9..d4e3085 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/build-on-Windows.yml @@ -1,4 +1,15 @@ -name: Windows Build +# --------------------------------------------------------------- +# Workflow File : build-on-Windows.yml +# File Authors : Aoran Zeng +# Contributors : Nul None +# | +# Created On : <2023-09-14> +# Last Modified : <2025-03-06> +# +# Build chsrc on Windows and upload it to GitHub: the 'pre' release +# --------------------------------------------------------------- + +name: Build on Windows on: push: branches: [ "gh-build" ] @@ -7,7 +18,6 @@ on: jobs: build-and-upload: - runs-on: windows-latest defaults: run: @@ -29,7 +39,7 @@ jobs: mingw-w64-i686-gcc mingw-w64-i686-make - - name: Compile chsrc x64 + - name: Build run: | mingw32-make.exe CI CI_ARTIFACT_NAME=chsrc-x64-windows @@ -42,7 +52,7 @@ jobs: - name: List files run: ls *.exe - - name: Release + - name: Upload uses: softprops/action-gh-release@v1 # if: startsWith(github.ref, 'refs/tags/') with: diff --git a/.github/workflows/macos.yml b/.github/workflows/build-on-macOS.yml similarity index 66% rename from .github/workflows/macos.yml rename to .github/workflows/build-on-macOS.yml index cf561de..e5f4f12 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/build-on-macOS.yml @@ -1,4 +1,15 @@ -name: macOS Build +# --------------------------------------------------------------- +# Workflow File : build-on-macOS.yml +# File Authors : Aoran Zeng +# Contributors : Nul None +# | +# Created On : <2023-09-15> +# Last Modified : <2025-03-06> +# +# Build chsrc on macOS and upload it to GitHub: the 'pre' release +# --------------------------------------------------------------- + +name: Build on macOS on: push: branches: [ "gh-build" ] @@ -13,14 +24,14 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 - - name: Compile chsrc for AArch64 + - name: Build for AArch64 run: | make CI CI_ARTIFACT_NAME=chsrc-aarch64-macos - name: List files run: ls *-macos - - name: Release + - name: Upload uses: softprops/action-gh-release@v1 # if: startsWith(github.ref, 'refs/tags/') with: @@ -37,14 +48,14 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 - - name: Compile chsrc for x64 + - name: Build for x64 run: | make CI CI_ARTIFACT_NAME=chsrc-x64-macos - name: List files run: ls *-macos - - name: Release + - name: Upload uses: softprops/action-gh-release@v1 # if: startsWith(github.ref, 'refs/tags/') with: diff --git a/.github/workflows/pkg-deb.yml b/.github/workflows/pkg-for-DEB.yml similarity index 98% rename from .github/workflows/pkg-deb.yml rename to .github/workflows/pkg-for-DEB.yml index 58e701c..4fd863d 100644 --- a/.github/workflows/pkg-deb.yml +++ b/.github/workflows/pkg-for-DEB.yml @@ -1,5 +1,5 @@ # --------------------------------------------------------------- -# Workflow File : pkg-deb.yml +# Workflow File : pkg-for-DEB.yml # File Authors : sanchuanhehe # Contributors : Aoran Zeng # | @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Checkout repo uses: actions/checkout@v4 - name: Get version from tag or input diff --git a/.github/workflows/pkg-aur-rel.yml b/.github/workflows/pub-AUR-chsrc-and-chsrc-bin.yml similarity index 78% rename from .github/workflows/pkg-aur-rel.yml rename to .github/workflows/pub-AUR-chsrc-and-chsrc-bin.yml index 7b46cda..9d86917 100644 --- a/.github/workflows/pkg-aur-rel.yml +++ b/.github/workflows/pub-AUR-chsrc-and-chsrc-bin.yml @@ -1,7 +1,19 @@ -# This workflow will publish the `chsrc` and the `chsrc-bin` packages to the AUR -# when there is a new `released` event. -# Note: only normal version tags like `v1.2.3` will be published. -name: Publish AUR Package (chsrc, chsrc-bin) +# --------------------------------------------------------------- +# Workflow File : pub-AUR-chsrc-and-chsrc-bin.yml +# File Authors : Terrasse +# Contributors : Nul None +# | +# Created On : <2024-08-29> +# Last Modified : <2025-03-18> +# +# Publish the 2 packages to AUR when a new release is created: +# 1. chsrc +# 2. chsrc-bin +# +# Note: only normal version tags like 'v1.2.3' will be published +# --------------------------------------------------------------- + +name: Publish 'chsrc' and 'chsrc-bin' to AUR on: release: types: [ released ] @@ -60,4 +72,4 @@ jobs: commit_username: ${{ secrets.AUR_USERNAME }} commit_email: ${{ secrets.AUR_EMAIL }} ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} - commit_message: "github-action-auto-publish v${{ env.version }}" \ No newline at end of file + commit_message: "github-action-auto-publish v${{ env.version }}" diff --git a/.github/workflows/pkg-aur-git.yml b/.github/workflows/pub-AUR-chsrc-git.yml similarity index 62% rename from .github/workflows/pkg-aur-git.yml rename to .github/workflows/pub-AUR-chsrc-git.yml index 4fa47db..10c2e31 100644 --- a/.github/workflows/pkg-aur-git.yml +++ b/.github/workflows/pub-AUR-chsrc-git.yml @@ -1,6 +1,15 @@ -# This workflow will publish the `chsrc-git` package to the AUR -# when the main branch is updated. -name: Publish AUR Package (chsrc-git) +# --------------------------------------------------------------- +# Workflow File : pub-AUR-chsrc-git.yml +# File Authors : Terrasse +# Contributors : Nul None +# | +# Created On : <2024-08-29> +# Last Modified : <2025-03-18> +# +# Publish package 'chsrc-git' to AUR when branch 'main' is updated. +# --------------------------------------------------------------- + +name: Publish 'chsrc-git' to AUR on: workflow_dispatch: push: diff --git a/.github/workflows/pub-WinGet.yml b/.github/workflows/pub-WinGet.yml new file mode 100644 index 0000000..79e3341 --- /dev/null +++ b/.github/workflows/pub-WinGet.yml @@ -0,0 +1,24 @@ +# --------------------------------------------------------------- +# Workflow File : pub-WinGet.yml +# File Authors : YU-7 <2747046473@qq.com> +# Contributors : Nul None +# | +# Created On : <2024-12-25> +# Last Modified : <2024-12-25> +# +# This workflow publish to winget +# --------------------------------------------------------------- + +name: Publish to WinGet +on: + release: + types: [released] +jobs: + publish: + runs-on: windows-latest + steps: + - uses: vedantmgoyal9/winget-releaser@main + with: + identifier: RubyMetric.chsrc + installers-regex: '\.exe$' # Only .exe files + token: ${{ secrets.WINGET_TOKEN }} diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml deleted file mode 100644 index fe7472c..0000000 --- a/.github/workflows/winget.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Publish to WinGet -on: - release: - types: [released] -jobs: - publish: - runs-on: windows-latest - steps: - - uses: vedantmgoyal9/winget-releaser@main - with: - identifier: RubyMetric.chsrc - installers-regex: '\.exe$' # Only .exe files - token: ${{ secrets.WINGET_TOKEN }} \ No newline at end of file