From 92e03364c923e49682ae569106b2ef92a44cff9c Mon Sep 17 00:00:00 2001 From: haritowa Date: Tue, 14 Mar 2023 01:40:35 +0300 Subject: [PATCH 1/3] ci: add manual release workflow trigger Signed-off-by: haritowa --- .github/actions/calculate_release_versions/action.yml | 7 ++++++- .github/workflows/release.yml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/calculate_release_versions/action.yml b/.github/actions/calculate_release_versions/action.yml index 46bac80..d704980 100644 --- a/.github/actions/calculate_release_versions/action.yml +++ b/.github/actions/calculate_release_versions/action.yml @@ -30,7 +30,12 @@ runs: version=$published_version fi - diff_version="$version" + if [ ${{ github.event_name }} = "workflow_dispatch" ]; then + diff_version="" + else + diff_version=$current_version + fi + if [ -z "$version" ]; then echo "::error ::Cannot determine version." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e31bfe6..af9b048 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,7 @@ on: - master schedule: - cron: '28 * * * *' + workflow_dispatch: jobs: semantic-release: From 4f4286afa412d6db7a8430d75c1d7a51f6b1adee Mon Sep 17 00:00:00 2001 From: haritowa Date: Tue, 14 Mar 2023 01:58:08 +0300 Subject: [PATCH 2/3] ci: fix org-name in release workflow Signed-off-by: haritowa --- .github/workflows/fetch_latest_versions.yml | 3 +++ .github/workflows/release.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fetch_latest_versions.yml b/.github/workflows/fetch_latest_versions.yml index a0eaee8..f156eb7 100644 --- a/.github/workflows/fetch_latest_versions.yml +++ b/.github/workflows/fetch_latest_versions.yml @@ -40,5 +40,8 @@ jobs: version: ${{ inputs.autoagora-indexer-service-version }} org-name: ${{ steps.to_lowercase.outputs.lowercased }} + - name: Print the repo owner + run: echo "The repo owner is ${{ steps.to_lowercase.outputs.lowercased }}" + - name: Print the unpublished tags run: echo "The unpublished tags are ${{ steps.get-unpublished-tags.outputs.tags }}" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af9b048..6024e05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,6 @@ jobs: with: indexer-version: ${{ matrix.indexer-version }} version: ${{ needs.semantic-release.outputs.version }} - org-name: ${{ needs.semantic-release.outputs.org-name }}} + org-name: ${{ needs.get-latest-versions.outputs.org-name }} secrets: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From ff7df47e6ebe0693bb80845783c8e667fa5c39ac Mon Sep 17 00:00:00 2001 From: haritowa Date: Tue, 14 Mar 2023 02:12:08 +0300 Subject: [PATCH 3/3] ci: cancel the release on non-main branch Signed-off-by: haritowa --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6024e05..2365588 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ jobs: semantic-release: runs-on: ubuntu-latest concurrency: release + if: github.ref == 'refs/heads/master' permissions: contents: write outputs: