Skip to content

Commit

Permalink
Create auto-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thejmitchener authored Nov 10, 2023
1 parent e2e39b0 commit e325a17
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Auto Tag and Release

on:
push:
pull_request:
types: [closed]
branches:
- main

jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- name: Bump version and push tag
id: bump_version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
WITH_V: true
RELEASE_BRANCHES: main

- name: Create GitHub Release
if: steps.bump_version.outputs.new_tag
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump_version.outputs.new_tag }}
release_name: Release ${{ steps.bump_version.outputs.new_tag }}
body: |
Changes in this Release:
${{ github.event.pull_request.title }}
${{ github.event.pull_request.body }}
draft: false
prerelease: false

0 comments on commit e325a17

Please sign in to comment.