Skip to content

Commit

Permalink
Added tag and release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderv32 committed Mar 21, 2024
1 parent 52cf5e4 commit 3100b6f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/v1-func-create-tag-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: v1-func-create-tag-and-release

on:
pull_request:
types: [closed]

jobs:
create-new-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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 }}

- 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 }}'

- name: 'gh::release'
if: ${{ steps.release-label.outputs.level != null }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.bump-semver.outputs.new_version }}

0 comments on commit 3100b6f

Please sign in to comment.