diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 622cfd9..3865622 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -2,7 +2,7 @@ name: EasyTier Core on: push: - branches: ["develop", "main"] + branches: ["develop", "main", "releases/**"] pull_request: branches: ["develop", "main"] @@ -20,14 +20,16 @@ jobs: runs-on: ubuntu-latest # Map a step output to a job output outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} + # do not skip push on branch starts with releases/ + should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 with: # All of these options are optional, so you can remove them if you are happy with the defaults - concurrent_skipping: 'never' + concurrent_skipping: 'same_content_newer' skip_after_successful_duplicate: 'true' + cancel_others: 'true' paths: '["Cargo.toml", "Cargo.lock", "easytier/**", ".github/workflows/core.yml", ".github/workflows/install_rust.sh"]' build: strategy: @@ -86,6 +88,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set current ref as env variable + run: | + echo "GIT_DESC=$(git log -1 --format=%cd.%h --date=format:%Y-%m-%d_%H:%M:%S)" >> $GITHUB_ENV + - name: Cargo cache uses: actions/cache@v4 with: @@ -196,7 +202,7 @@ jobs: endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }} bucket: ${{ secrets.ALIYUN_OSS_BUCKET }} local-path: ./artifacts/ - remote-path: /easytier-releases/${{ github.sha }}/ + remote-path: /easytier-releases/${{env.GIT_DESC}}/easytier-${{ matrix.ARTIFACT_NAME }} no-delete-remote-files: true retry: 5 core-result: diff --git a/.github/workflows/gui.yml b/.github/workflows/gui.yml index e1496d9..e7f3d84 100644 --- a/.github/workflows/gui.yml +++ b/.github/workflows/gui.yml @@ -2,7 +2,7 @@ name: EasyTier GUI on: push: - branches: ["develop", "main"] + branches: ["develop", "main", "releases/**"] pull_request: branches: ["develop", "main"] @@ -20,14 +20,15 @@ jobs: runs-on: ubuntu-latest # Map a step output to a job output outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} + should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 with: # All of these options are optional, so you can remove them if you are happy with the defaults - concurrent_skipping: 'never' + concurrent_skipping: 'same_content_newer' skip_after_successful_duplicate: 'true' + cancel_others: 'true' paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", ".github/workflows/gui.yml", ".github/workflows/install_rust.sh"]' build-gui: strategy: @@ -69,6 +70,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set current ref as env variable + run: | + echo "GIT_DESC=$(git log -1 --format=%cd.%h --date=format:%Y-%m-%d_%H:%M:%S)" >> $GITHUB_ENV + - uses: actions/setup-node@v4 with: node-version: 21 @@ -197,7 +202,7 @@ jobs: endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }} bucket: ${{ secrets.ALIYUN_OSS_BUCKET }} local-path: ./artifacts/ - remote-path: /easytier-releases/${{ github.sha }}/gui + remote-path: /easytier-releases/${{env.GIT_DESC}}/easytier-gui-${{ matrix.ARTIFACT_NAME }} no-delete-remote-files: true retry: 5 gui-result: diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 9a669c7..72bbda7 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -2,7 +2,7 @@ name: EasyTier Mobile on: push: - branches: ["develop", "main"] + branches: ["develop", "main", "releases/**"] pull_request: branches: ["develop", "main"] @@ -20,14 +20,15 @@ jobs: runs-on: ubuntu-latest # Map a step output to a job output outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} + should_skip: ${{ steps.skip_check.outputs.should_skip == 'true' && !startsWith(github.ref_name, 'releases/') }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v5 with: # All of these options are optional, so you can remove them if you are happy with the defaults - concurrent_skipping: 'never' + concurrent_skipping: 'same_content_newer' skip_after_successful_duplicate: 'true' + cancel_others: 'true' paths: '["Cargo.toml", "Cargo.lock", "easytier/**", "easytier-gui/**", "tauri-plugin-vpnservice/**", ".github/workflows/mobile.yml", ".github/workflows/install_rust.sh"]' build-mobile: strategy: @@ -48,6 +49,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set current ref as env variable + run: | + echo "GIT_DESC=$(git log -1 --format=%cd.%h --date=format:%Y-%m-%d_%H:%M:%S)" >> $GITHUB_ENV + - uses: actions/setup-java@v4 with: distribution: 'oracle' @@ -150,7 +155,7 @@ jobs: endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }} bucket: ${{ secrets.ALIYUN_OSS_BUCKET }} local-path: ./artifacts/ - remote-path: /easytier-releases/${{ github.sha }}/mobile + remote-path: /easytier-releases/${{env.GIT_DESC}}/easytier-gui-${{ matrix.ARTIFACT_NAME }} no-delete-remote-files: true retry: 5 mobile-result: