diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 997a31b..e5543f1 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -45,7 +45,7 @@ jobs: id: bump-semver with: current_version: ${{ steps.get-latest-tag.outputs.tag }} - level: ${{needs.check-label.outputs.level }} + level: ${{ needs.check-label.outputs.level }} - name: Create or update comment uses: peter-evans/create-or-update-comment@v4 diff --git a/.github/workflows/new-release.yml b/.github/workflows/new-release.yml index c86c830..33c7ea4 100644 --- a/.github/workflows/new-release.yml +++ b/.github/workflows/new-release.yml @@ -6,10 +6,10 @@ on: - release/cli jobs: - get-release-level: + get-new-version: runs-on: ubuntu-latest outputs: - value: ${{ steps.release-label.outputs.level }} + value: ${{ steps.bump-semver.outputs.new_version }} steps: - uses: actions/checkout@v4 @@ -24,9 +24,18 @@ jobs: labels: ${{ steps.get-merged-pull-request.outputs.labels }} label_prefix: "bump:" + - uses: actions-ecosystem/action-get-latest-tag@v1 + id: get-latest-tag + + - uses: actions-ecosystem/action-bump-semver@v1 + id: bump-semver + with: + current_version: ${{ steps.get-latest-tag.outputs.tag }} + level: ${{ steps.release-label.outputs.level }} + goreleaser: runs-on: ubuntu-latest - needs: [get-release-level] + needs: [get-new-version] permissions: contents: write steps: @@ -42,7 +51,7 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: - version: ${{ needs.get-release-level.outputs.value }} + version: ${{ needs.get-new-version.outputs.value }} args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}