From 605c67c22f7f654a16fe94a6653e93a8b05fa720 Mon Sep 17 00:00:00 2001 From: Roee Gadot Date: Thu, 17 Jun 2021 16:57:30 +0300 Subject: [PATCH] no message --- .github/workflows/publish-cli.yml | 17 ++++++++++++++++- .github/workflows/release.yml | 28 ---------------------------- 2 files changed, 16 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index 3790568f2..1936103db 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -15,5 +15,20 @@ jobs: with: service_account_key: ${{ secrets.GCR_JSON_KEY }} export_default_credentials: true + - name: Get base image name + shell: bash + run: | + echo "##[set-output name=cal_ver;]$(echo $(date +'%y.%m.%d'))" + echo "##[set-output name=build_time_utc;]$(echo $(date -u))" + echo "##[set-output name=build_timestamp;]$(echo $(date +%s))" + echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: version_parameters - name: Build and Push CLI - run: make push-cli + run: make push-cli CAL_VER='${{ steps.version_parameters.outputs.cal_ver }}' BUILD_TIME_UTC='${{ steps.version_parameters.outputs.build_time_utc }}' BUILD_TIMESTAMP='${{ steps.version_parameters.outputs.build_timestamp }}' + - if: github.ref == 'refs/heads/main' + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + artifacts: "cli/bin/*" + commit: ${{ steps.version_parameters.outputs.branch }} + tag: ${{ steps.version_parameters.outputs.cal_ver }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 7c271f439..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Release - -on: - push: - branches: - - my-temp-release-check - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Get base image name - shell: bash - run: | - echo "##[set-output name=cal_ver;]$(echo $(date +'%Y.%m.%d'))" - echo "##[set-output name=build_time_utc;]$(echo $(date -u))" - echo "##[set-output name=build_timestamp;]$(echo $(date +%s))" - echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: version_parameters - - name: Build CLI - run: cd cli && make build-all CAL_VER='${{ steps.version_parameters.outputs.cal_ver }}' BUILD_TIME_UTC='${{ steps.version_parameters.outputs.build_time_utc }}' BUILD_TIMESTAMP='${{ steps.version_parameters.outputs.build_timestamp }}' - - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - artifacts: "cli/bin/*" - commit: ${{ steps.version_parameters.outputs.branch }} - tag: ${{ steps.version_parameters.outputs.cal_ver }} \ No newline at end of file