diff --git a/.github/workflows/release-auto.yml b/.github/workflows/release-auto.yml index 924793fb..f72446b1 100644 --- a/.github/workflows/release-auto.yml +++ b/.github/workflows/release-auto.yml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest needs: - get_pull_request - if: ${{ contains(needs.get_pull_request.outputs.pull_request_labels, 'release/patch') || contains(needs.get_pull_request.outputs.pull_request_labels, 'release/minor') || contains(needs.get_pull_request.outputs.pull_request_labels, 'release/major') }} + #if: ${{ contains(needs.get_pull_request.outputs.pull_request_labels, 'release/patch') || contains(needs.get_pull_request.outputs.pull_request_labels, 'release/minor') || contains(needs.get_pull_request.outputs.pull_request_labels, 'release/major') }} steps: - name: Checkout uses: actions/checkout@v2 @@ -73,4 +73,30 @@ jobs: run: | git tag -a "blah" -m "Release blah" git push origin --tags + + - uses: actions-ecosystem/action-release-label@v1 + id: release-label + #if: ${{ github.event.pull_request.merged == true }} + + - uses: actions-ecosystem/action-get-latest-tag@v1 + id: get-latest-tag + if: ${{ steps.release-label.outputs.level != null }} + + - uses: actions-ecosystem/action-bump-semver@v1 + id: bump-semver + if: ${{ steps.release-label.outputs.level != null }} + with: + current_version: ${{ steps.get-latest-tag.outputs.tag }} + level: ${{ steps.release-label.outputs.level }} + + - name: what is it doing + run: | + echo "The new version is: ${{ steps.bump-semver.outputs.new_version }}" + echo "The label is: ${{ needs.get_pull_request.outputs.pull_request_labels }}" + + #- uses: actions-ecosystem/action-push-tag@v1 + # if: ${{ steps.release-label.outputs.level != null }} + # with: + # tag: ${{ steps.bump-semver.outputs.new_version }} + # message: '${{ steps.bump-semver.outputs.new_version }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}'