-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (32 loc) · 978 Bytes
/
auto-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
### This Workflow fully automates a Git release after a Pull Request that is not created by depandabot is merged.
name: "Automated Release"
on:
workflow_dispatch:
pull_request:
branches:
- main
types:
- closed
jobs:
if_merged:
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
if: ${{ (github.event.pull_request.merged) && (github.actor != 'dependabot[bot]') }}
steps:
- name: Determine version
id: version
uses: zwaldowski/semver-release-action@v3
with:
bump: patch
dry_run: true
github_token: ${{secrets.GITHUB_TOKEN}}
- name: Create new release and push to registry
id: release
uses: ncipollo/[email protected]
with:
generateReleaseNotes: true
name: "v${{ steps.version.outputs.version }}"
tag: ${{ steps.version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}