diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08c76e03cb5..10a04350e00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,12 @@ on: push: branches-ignore: - '**' + #branches: + # - 'master' + #tags: + ## only trigger on release tags: + #- 'v*.*.*' + #- 'v*.*.*-*' workflow_dispatch: inputs: checkout_ref: @@ -53,7 +59,7 @@ jobs: steps: - name: Checkout git repository ${{ env.APP_REPO }} - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 ## 4.1.7 release with: repository: ${{ env.APP_REPO }} fetch-depth: 0 @@ -76,16 +82,16 @@ jobs: echo "short_commit_id=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT - name: Login to Docker Hub - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 ## v3.3.0 with: username: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_USERNAME }} password: ${{ secrets.ORG_DOCKERHUB_ERIGONTECH_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf ## v3.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db + uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db ## v3.6.1 - name: Build binaries with goreleaser env: @@ -140,7 +146,7 @@ jobs: --platform linux/amd64,linux/amd64/v2,linux/arm64 . - name: Upload artifact -- linux/arm64 - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6 with: name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_arm64.tar.gz @@ -149,7 +155,7 @@ jobs: if-no-files-found: error - name: Upload artifact -- linux/amd64 - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6 with: name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64.tar.gz @@ -158,7 +164,7 @@ jobs: if-no-files-found: error - name: Upload artifact -- linux/amd64/v2 - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6 with: name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_linux_amd64v2.tar.gz @@ -167,7 +173,7 @@ jobs: if-no-files-found: error - name: Upload artifact -- darwin/arm64 - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6 with: name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_arm64.tar.gz path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_arm64.tar.gz @@ -176,13 +182,21 @@ jobs: if-no-files-found: error - name: Upload artifact -- darwin/amd64 - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a ## v4.3.6 with: name: ${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_amd64.tar.gz path: ./dist/${{ env.APPLICATION }}_${{ inputs.release_version }}_darwin_amd64.tar.gz retention-days: 1 compression-level: 0 if-no-files-found: error + ## not required for now -- commented: + # - name: Create and push a git tag for the released version in case perform_release is set + # if: ${{ inputs.perform_release }} + # run: | + # git config --global user.email ${{ env.GITHUB_AUTOMATION_EMAIL }} + # git config --global user.name "${{ env.GITHUB_AUTOMATION_NAME }}" + # git tag -a ${{ inputs.release_version }} -m "Release ${{ inputs.release_version }}" + # git push origin ${{ inputs.release_version }} test-release: strategy: @@ -221,7 +235,7 @@ jobs: echo "Error detected during tests" echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT" fi - + - name: Action for Success if: steps.test_step.outputs.TEST_RESULT == 'success' run: echo "::notice::Tests completed successfully"