From a8a9448d9e4b6abc140fcd73374a8fa9f6a9fdd8 Mon Sep 17 00:00:00 2001 From: juewuy Date: Mon, 22 Jan 2024 19:31:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0singbox=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=89=88actions=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/update_singbox_core_test.yaml | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_singbox_core_test.yaml b/.github/workflows/update_singbox_core_test.yaml index 9618621..8f1b6ff 100644 --- a/.github/workflows/update_singbox_core_test.yaml +++ b/.github/workflows/update_singbox_core_test.yaml @@ -12,7 +12,7 @@ on: required: true type: string tag3: - description: 'a new prerelease name or not' + description: 'a new prerelease name or not, if value=0, then only upload-artifact' required: false type: string tag4: @@ -140,10 +140,13 @@ jobs: path: sing-box push_prerelease: - needs: cross + needs: + - cross + - sing-box runs-on: ubuntu-latest env: - VERSION: ${{needs.sing-box.outputs.version}} + RELEASE: ${{ github.event.inputs.tag3 }} + VERSION: ${{ steps.sing-box.outputs.version }} steps: - name: Get upx run: | @@ -174,9 +177,10 @@ jobs: done rm -fr upx* rm -fr ./tmp/core.tar.gz - echo ${VERSION} > /tmp/version + echo ${VERSION} > ./tmp/version - name: Create Release and Upload Release Asset + if: ${{ env.RELEASE != '0' }} uses: softprops/action-gh-release@v1 with: tag_name: singbox_core${{ github.event.inputs.tag3 }} @@ -187,6 +191,15 @@ jobs: files: | ./tmp/* + - name: upload artifact + if: ${{ env.RELEASE == '0' }} + uses: actions/upload-artifact@v4.1.0 + with: + name: sing-box-${{env.VERSION}}-${{matrix.jobs.output}} + path: | + ./tmp/sing-box* + compression-level: 9 + - name: Cleanup Workflow uses: Mattraks/delete-workflow-runs@main with: