diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml deleted file mode 100644 index f43e3d8d..00000000 --- a/.github/workflows/platform.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: "Release Develop Version" - -on: - # See https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow - workflow_dispatch: - -jobs: - check-test-dev: - steps: - - name: Wait for Test Workflow - uses: fountainhead/action-wait-for-check@v1.1.0 - id: wait-for-test - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: test-final - ref: ${{ github.sha }} - timeoutSeconds: 3600 - - name: Check Test Workflow result - if: steps.wait-for-test.outputs.conclusion != 'success' - run: | - echo "Test Workflow failed, aborting release" && exit 1 - runs-on: ubuntu-20.04 - - check-test-online: - steps: - - name: Wait for Test Online Workflow - uses: fountainhead/action-wait-for-check@v1.1.0 - id: wait-for-test - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: test-online-final - ref: ${{ github.sha }} - timeoutSeconds: 3600 - - name: Check Test Workflow result - if: steps.wait-for-test.outputs.conclusion != 'success' - run: | - echo "Test Workflow failed, aborting release" && exit 1 - runs-on: ubuntu-20.04 - - envs: - needs: - - check-test-dev - - check-test-online - name: envs - steps: - ################################################################################################################## - # Git checkout - - name: Checkout repository - uses: actions/checkout@v3 - # The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8 - # Generate variables like: - # SRS_TAG=v1.0.52 - # SRS_MAJOR=1 - # @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable - - name: Generate varaiables - run: | - SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}') - echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV - SRS_MAJOR=$(echo $SRS_TAG| awk -F '.' '{print $1}' |sed 's/v//g') - echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV - # Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs - outputs: - SRS_TAG: ${{ env.SRS_TAG }} - SRS_MAJOR: ${{ env.SRS_MAJOR }} - runs-on: ubuntu-20.04 - - docker: - needs: - - envs - steps: - - name: Covert output to env - run: | - echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV - echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV - # Git checkout - - name: Checkout repository - uses: actions/checkout@v3 - # See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization - # https://github.com/docker/setup-qemu-action - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - # https://github.com/docker/setup-buildx-action - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - # Create main images for Docker - - name: Login to docker hub - uses: docker/login-action@v2 - with: - username: "${{ secrets.DOCKER_USERNAME }}" - password: "${{ secrets.DOCKER_PASSWORD }}" - - name: Build the ui for multiple archs - run: | - echo "Build multiple language ui" - cd ui && make build-cn -j && make build-en -j - - name: Build SRS docker image - run: | - echo "Release ossrs/srs-stack:$SRS_TAG" - docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \ - --output "type=image,push=true" --build-arg MAKEARGS=build-no-ui \ - --tag ossrs/srs-stack:$SRS_TAG -f Dockerfile . - - name: Docker alias images for ossrs/srs-stack - uses: akhilerm/tag-push-action@v2.1.0 - with: - src: ossrs/srs-stack:${{ env.SRS_TAG }} - dst: | - ossrs/srs-stack:${{ env.SRS_MAJOR }} - ossrs/srs-stack:v${{ env.SRS_MAJOR }} - ossrs/srs-cloud:${{ env.SRS_TAG }} - ossrs/srs-cloud:${{ env.SRS_MAJOR }} - ossrs/srs-cloud:v${{ env.SRS_MAJOR }} - ossrs/srs-cloud:platform-${{ env.SRS_TAG }} - ossrs/srs-cloud:platform-${{ env.SRS_MAJOR }} - ossrs/srs-cloud:platform-v${{ env.SRS_MAJOR }} - runs-on: ubuntu-20.04 - - aliyun: - needs: - - envs - - docker - steps: - - name: Covert output to env - run: | - echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV - echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV - # Aliyun ACR - - name: Login Aliyun docker hub - uses: docker/login-action@v2 - with: - registry: registry.cn-hangzhou.aliyuncs.com - username: "${{ secrets.ACR_USERNAME }}" - password: "${{ secrets.ACR_PASSWORD }}" - - name: Docker alias images for ossrs/srs-stack - uses: akhilerm/tag-push-action@v2.1.0 - with: - src: ossrs/srs-stack:${{ env.SRS_TAG }} - dst: | - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_TAG }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:v${{ env.SRS_MAJOR }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:${{ env.SRS_TAG }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:${{ env.SRS_MAJOR }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:v${{ env.SRS_MAJOR }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:platform-${{ env.SRS_TAG }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:platform-${{ env.SRS_MAJOR }} - registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:platform-v${{ env.SRS_MAJOR }} - runs-on: ubuntu-20.04 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3ae9d10..57a8245f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: "Release Stable Version" +name: "Release New Version" # @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags on: