Skip to content

Commit 70807cc

Browse files
committed
adding workflow to tag releases.
1 parent e3c2565 commit 70807cc

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on pushes to the main branch
7+
8+
jobs:
9+
publish_release:
10+
runs-on: ubuntu-latest
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Create Version
21+
uses: dexwritescode/release-on-merge-action@v1 # Or another suitable action
22+
id: version_tracker
23+
with:
24+
version-increment-strategy: patch
25+
dry-run: true
26+
initial-version: '1.0.0'
27+
28+
- name: Modify the file
29+
run: |
30+
perl -pi -e 's/0\.0\.0/${{ steps.version_tracker.outputs.version }}/' DevSetup.psd1
31+
32+
- name: Commit and push changes
33+
uses: stefanzweifel/git-auto-commit-action@v5
34+
with:
35+
commit_message: "Automated Release Tagging for ${{ steps.version_tracker.outputs.version }} in DevSetup.psd1"
36+
branch: main
37+
38+
- name: Create Tagged Release
39+
uses: dexwritescode/release-on-merge-action@v1 # Or another suitable action
40+
with:
41+
version-increment-strategy: patch
42+
initial-version: '1.0.0'

0 commit comments

Comments
 (0)