Merge pull request #16 from pwshdevs/1.0.10-Features #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |