From 418f4c47c9e027eb806e4321f3ec23eb04de8c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C=E4=BA=91?= Date: Mon, 23 Oct 2023 19:37:19 +0800 Subject: [PATCH] =?UTF-8?q?ci(GiteaActions):=20=E7=8E=B0=E5=9C=A8=E5=8F=AA?= =?UTF-8?q?=E4=BC=9A=E6=A0=B9=E6=8D=AE=20tag=E7=A1=AE=E5=AE=9A=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ζŽδΈœδΊ‘ --- .gitea/workflows/publish_on_release.yml | 20 ++++++++++++------- ...lish_on_push.yml => publish_on_tagged.yml} | 14 ++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) rename .gitea/workflows/{publish_on_push.yml => publish_on_tagged.yml} (64%) diff --git a/.gitea/workflows/publish_on_release.yml b/.gitea/workflows/publish_on_release.yml index c9f59d8..28b8932 100644 --- a/.gitea/workflows/publish_on_release.yml +++ b/.gitea/workflows/publish_on_release.yml @@ -1,19 +1,25 @@ -name: Publish when Released -run-name: ${{ gitea.actor }} is testing out Gitea Actions πŸš€ +name: Release to registry on: [ release ] jobs: - Explore-Gitea-Actions: + Publish on Released: runs-on: ubuntu-latest steps: - - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - run: echo "πŸ”Ž The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: echo "πŸ’‘ The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ gitea.workspace }} + - name: Zip files in the repository + run: | + apt-get update + apt-get install zip + zip hdk-core.dist.zip * + - name: Publish to registry + run: | + curl --user ch4o5:4fd300672472e666014314c1c94c604c634165a9 \ + --upload-file ./hdk-core.dist.zip \ + https://nest.doylee.cn/api/packages/HDK/composer?version=${{ gitea.ref_name }} - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.gitea/workflows/publish_on_push.yml b/.gitea/workflows/publish_on_tagged.yml similarity index 64% rename from .gitea/workflows/publish_on_push.yml rename to .gitea/workflows/publish_on_tagged.yml index 1c035d5..6e0870c 100644 --- a/.gitea/workflows/publish_on_push.yml +++ b/.gitea/workflows/publish_on_tagged.yml @@ -1,20 +1,14 @@ -name: Publish when Pushed -run-name: ${{ gitea.actor }} is testing out Gitea Actions πŸš€ -on: [ push ] +name: Release development version to registry +on: [ tag ] jobs: - Explore-Gitea-Actions: + Publish on Tagged: runs-on: ubuntu-latest - secrets: - USERNAME: steps: - - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - run: echo "πŸ”Ž The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - name: Check out repository code uses: actions/checkout@v4 - run: echo "πŸ’‘ The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ gitea.workspace }} @@ -27,5 +21,5 @@ jobs: run: | curl --user ch4o5:4fd300672472e666014314c1c94c604c634165a9 \ --upload-file ./hdk-core.dist.zip \ - https://nest.doylee.cn/api/packages/HDK/composer?version=dev-${{ gitea.ref_name }} + https://nest.doylee.cn/api/packages/HDK/composer?version=${{ gitea.ref_name }}-alpha - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file