From 7497ca6279acce7c3e97a13a328fdbf71e8169ab Mon Sep 17 00:00:00 2001 From: Santiago Bernhardt Date: Tue, 4 Oct 2022 20:41:41 +1300 Subject: [PATCH 1/2] sort tags skip draf releases --- .github/workflows/main.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f5279f6d..11f483f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,12 +9,13 @@ on: jobs: build: + if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: - ref: master fetch-depth: '0' + ref: ${{ github.ref_name }} - name: version-tag id: tag @@ -23,13 +24,14 @@ jobs: VERBOSE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: automatic-draft-release - uses: marvinpinto/action-automatic-releases@v1.2.1 - with: - draft: true - repo_token: ${{ secrets.GITHUB_TOKEN }} - title: "${{ steps.tag.outputs.tag }}: [title-edit-me] by:${{ github.actor }}" - automatic_release_tag: ${{ steps.tag.outputs.tag }} + # auto releases is not working atm and is deleting releases due branch tags + #- name: automatic-draft-release + # uses: marvinpinto/action-automatic-releases@v1.2.1 + # with: + # draft: true + # repo_token: ${{ secrets.GITHUB_TOKEN }} + # title: "${{ steps.tag.outputs.tag }}: [title-edit-me] by:${{ github.actor }}" + # automatic_release_tag: ${{ steps.tag.outputs.tag }} - name: version-tag-major env: From b3501dfd89a4d52568deb8a8f46b5f5850edf04e Mon Sep 17 00:00:00 2001 From: Santiago Bernhardt Date: Tue, 4 Oct 2022 20:59:51 +1300 Subject: [PATCH 2/2] we introduced a breaking change in outputs rolling back with hotfix --- .github/workflows/main.yml | 14 +++++++------- .github/workflows/test.yml | 4 ++-- entrypoint.sh | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11f483f5..e11136de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,13 +25,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # auto releases is not working atm and is deleting releases due branch tags - #- name: automatic-draft-release - # uses: marvinpinto/action-automatic-releases@v1.2.1 - # with: - # draft: true - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # title: "${{ steps.tag.outputs.tag }}: [title-edit-me] by:${{ github.actor }}" - # automatic_release_tag: ${{ steps.tag.outputs.tag }} + - name: automatic-draft-release + uses: marvinpinto/action-automatic-releases@v1.2.1 + with: + draft: true + repo_token: ${{ secrets.GITHUB_TOKEN }} + title: "${{ steps.tag.outputs.tag }}: [title-edit-me] by:${{ github.actor }}" + automatic_release_tag: ${{ steps.tag.outputs.new_tag }} - name: version-tag-major env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b62193f6..2081e12f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,10 +51,10 @@ jobs: shell: bash run: | set -x - MAIN_OUTPUT_TAG=${{ steps.test_main.outputs.tag }} + MAIN_OUTPUT_TAG=${{ steps.test_main.outputs.old_tag }} MAIN_OUTPUT_NEWTAG=${{ steps.test_main.outputs.new_tag }} MAIN_OUTPUT_PART=${{ steps.test_main.outputs.part }} - PRE_OUTPUT_TAG=${{ steps.test_pre.outputs.tag }} + PRE_OUTPUT_TAG=${{ steps.test_pre.outputs.old_tag }} PRE_OUTPUT_NEWTAG=${{ steps.test_pre.outputs.new_tag }} PRE_OUTPUT_PART=${{ steps.test_pre.outputs.part }} diff --git a/entrypoint.sh b/entrypoint.sh index 0a61a76d..f7386e2e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -184,7 +184,8 @@ fi # set outputs echo "::set-output name=new_tag::$new" echo "::set-output name=part::$part" -echo "::set-output name=tag::$tag" +echo "::set-output name=tag::$new" # this needs to go in v2 is breaking change +echo "::set-output name=old_tag::$tag" # dry run exit without real changes if $dryrun