From d0b432c1a8f5873b161105bb0a6474a13e560384 Mon Sep 17 00:00:00 2001 From: Sekar Anglila Hapsari Date: Fri, 5 Apr 2024 12:57:58 +0700 Subject: [PATCH] Update generate-release-tag.yml --- .github/workflows/generate-release-tag.yml | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/workflows/generate-release-tag.yml b/.github/workflows/generate-release-tag.yml index 157140df..529c6e76 100644 --- a/.github/workflows/generate-release-tag.yml +++ b/.github/workflows/generate-release-tag.yml @@ -4,53 +4,53 @@ on: types: [create-release-tag] jobs: - # testing: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # go-version: ["1.18", "1.19", "1.20"] + testing: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ["1.18", "1.19", "1.20"] - # steps: - # - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - # - name: Setup go - # uses: actions/setup-go@v1 - # with: - # go-version: ${{ matrix.go-version}} + - name: Setup go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version}} - # - name: Print current golang version - # run: echo go version + - name: Print current golang version + run: echo go version - # - name: Install dependencies - # run: go get github.com/joho/godotenv + - name: Install dependencies + run: go get github.com/joho/godotenv - # - name: Run Test - # run: DEVELOPMENT_API_KEY=${{ secrets.DEVELOPMENT_API_KEY }} go test ./test -v + - name: Run Test + run: DEVELOPMENT_API_KEY=${{ secrets.DEVELOPMENT_API_KEY }} go test ./test -v - # send-test-result: - # name: Slack Notification - # needs: [testing] - # if: always() && (needs.testing.result == 'success' || needs.testing.result == 'failure') - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 + send-test-result: + name: Slack Notification + needs: [testing] + if: always() && (needs.testing.result == 'success' || needs.testing.result == 'failure') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - # - name: Set Slack Color - # id: set_color - # run: | - # if [ "${{ needs.testing.result }}" == "success" ]; then - # echo "color=good" >> $GITHUB_ENV - # else - # echo "color=danger" >> $GITHUB_ENV - # fi + - name: Set Slack Color + id: set_color + run: | + if [ "${{ needs.testing.result }}" == "success" ]; then + echo "color=good" >> $GITHUB_ENV + else + echo "color=danger" >> $GITHUB_ENV + fi - # - name: Send Slack Notification - # uses: rtCamp/action-slack-notify@v2 - # env: - # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - # SLACK_TITLE: "[xendi-go] CI pipeline for ${{ github.event.client_payload.version }}" - # SLACK_MESSAGE: 'Test Result: ${{ needs.testing.result }}' - # SLACK_COLOR: ${{ steps.set_color.outputs.color }} + - name: Send Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_TITLE: "[xendi-go] CI pipeline for ${{ github.event.client_payload.version }}" + SLACK_MESSAGE: 'Test Result: ${{ needs.testing.result }}' + SLACK_COLOR: ${{ steps.set_color.outputs.color }} publish-release-tag: runs-on: ubuntu-latest