From 8a4a3e46e92f4822966578716232c9e66eb34f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=95=96=E5=BE=8B=E9=A3=8E?= Date: Mon, 3 Mar 2025 08:54:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=E5=8F=91=E5=B8=83?= =?UTF-8?q?=20release=20=E7=89=88=E6=9C=AC=E7=9A=84=20GitHub=20Actions=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81-=20=E5=88=9B=E5=BB=BA=20release.yml?= =?UTF-8?q?=20=E6=96=87=E4=BB=B6=EF=BC=8C=E5=AE=9A=E4=B9=89=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=B5=81=E7=A8=8B=20-=20=E9=85=8D=E7=BD=AE=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E6=97=A5=E5=BF=97=E7=94=9F=E6=88=90=E5=92=8C=E5=8F=91?= =?UTF-8?q?=E5=B8=83=20release=20=E7=9A=84=E4=B8=A4=E4=B8=AA=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=20-=20=E8=AE=BE=E7=BD=AE=20Go=20=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=EF=BC=8C=E8=BF=90=E8=A1=8C=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=20-=20=E4=BD=BF=E7=94=A8=E7=AC=AC=E4=B8=89=E6=96=B9=20action?= =?UTF-8?q?=20=E7=94=9F=E6=88=90=E5=8F=98=E6=9B=B4=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=92=8C=E5=8F=91=E5=B8=83=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..644c1f6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +on: + push: + tags: + - "v*" +permissions: + contents: write +jobs: + changelog: + runs-on: + - ubuntu-latest + steps: + - name: "✏️ Generate release changelog" + uses: heinrichreimer/action-github-changelog-generator@v2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release: + runs-on: + - ubuntu-latest + needs: + - changelog + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 'stable' + - run: go mod tidy + - run: go mod vendor + - run: go test -v ./... + name: "🐞 unit test" + continue-on-error: true + - name: "πŸš„ publish release" + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/v') + with: + body: ${{needs.changelog.output.changelog}} + fail_on_unmatched_files: false \ No newline at end of file From 006dae29f70ebaa63173d7c4389680f857c33338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=95=96=E5=BE=8B=E9=A3=8E?= Date: Mon, 3 Mar 2025 09:00:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0=20GitHub=20Actions?= =?UTF-8?q?=20=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - δΌ˜εŒ– release ε·₯δ½œζ΅η»“ζž„οΌŒεˆ†δΈΊη”Ÿζˆε˜ζ›΄ζ—₯εΏ—ε’Œε‘εΈƒ release δΈ€δΈͺη‹¬η«‹ηš„ job - ζ›΄ζ–°ιƒ¨εˆ†ζ­₯ιͺ€εη§°δΈΊδΈ­ζ–‡οΌŒζι«˜ε―θ―»ζ€§ --- .github/workflows/release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 644c1f6..583f07c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,15 +9,13 @@ jobs: runs-on: - ubuntu-latest steps: - - name: "✏️ Generate release changelog" + - name: "✏️ η”Ÿζˆε˜ζ›΄ζ—₯εΏ—" uses: heinrichreimer/action-github-changelog-generator@v2.3 with: token: ${{ secrets.GITHUB_TOKEN }} - release: + unit-test: runs-on: - ubuntu-latest - needs: - - changelog steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 @@ -26,9 +24,15 @@ jobs: - run: go mod tidy - run: go mod vendor - run: go test -v ./... - name: "🐞 unit test" + name: "🐞 单元桋试" continue-on-error: true - - name: "πŸš„ publish release" + release: + runs-on: + - ubuntu-latest + needs: + - changelog + steps: + - name: "πŸš„ 发布 release" uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/v') with: