-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.43 KB
/
update-module-version.yaml
File metadata and controls
44 lines (38 loc) · 1.43 KB
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
36
37
38
39
40
41
42
43
44
name: Update Module Version
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
update_module_version:
name: Update Module Version
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
issues: read
checks: write
pull-requests: write
steps:
- name: Checkout Repository Code
uses: actions/checkout@v2
- name: Create Version From Current Tags
uses: dexwritescode/release-on-merge-action@v1 # Or another suitable action
id: version_tracker
with:
version-increment-strategy: patch
dry-run: true
initial-version: '1.0.0'
- name: Modify DevSetup.psd1 to have the current version
run: |
perl -pi -e 's/[0-9]+\.[0-9]+\.[0-9]+/${{ steps.version_tracker.outputs.version }}/' DevSetup/DevSetup.psd1
- name: Create Branch and Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: Automated Release Tagging for ${{ steps.version_tracker.outputs.version }} in DevSetup.psd1
title: Automated Release Tagging for ${{ steps.version_tracker.outputs.version }} in DevSetup.psd1
body: Changing version to ${{ steps.version_tracker.outputs.version }}
branch: update-release-version-to-${{ steps.version_tracker.outputs.version }}
token: ${{ secrets.WORKFLOW_TOKEN }}