Skip to content

Commit

Permalink
Experimenting with autotagging...
Browse files Browse the repository at this point in the history
  • Loading branch information
DevOpsDave committed Jan 9, 2024
1 parent 4ef3c0a commit 20857d3
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/release-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}'

0 comments on commit 20857d3

Please sign in to comment.