synapse icon indicating copy to clipboard operation
synapse copied to clipboard

ci(Workflows): New versioning workflow [skip hint]

Open cbcrouse opened this issue 3 years ago • 2 comments

This commit will not affect the version of the published code. See Commit Hints.

Many thanks for submitting your Pull Request :heart:!

What this PR does / why we need it:

  • Adds a new workflow which triggers on changes from the main branch that will result in the project version being incremented.

Special notes for reviewers:

  • The URL for the repository might not be entirely correct, please review the tokens and username values. I tried to grab values from the publish workflow.

Additional information (if needed):

Due to the existing workflow that triggers on release, I did not add any additional workflows. If you decide to create a workflow in the future that triggers on the completion of the versioning, here is an example:

name: main

on:

  workflow_run:
    workflows: [auto-version]
    types:
      - completed
    
  workflow_dispatch:
    
jobs:
    
  on-success:
    runs-on: ubuntu-latest
    if: ${{ github.event.workflow_run.conclusion == 'success' }}
    steps:
      - run: echo 'The triggering workflow passed'
      
  on-failure:
    runs-on: ubuntu-latest
    if: ${{ github.event.workflow_run.conclusion == 'failure' }}
    steps:
      - run: echo 'The triggering workflow failed'

I hope this helps, cheers!

cbcrouse avatar Apr 30 '22 22:04 cbcrouse

Thank you very much for your contribution @cbcrouse ❤️ ! And a big up for your awesome Versioning.NET project!!!

cdavernas avatar May 02 '22 13:05 cdavernas

Hey @cbcrouse! Sorry for the delay for merging the your (awesome) PR. We needed to make sure to prepare our solution and purge past comments in order to start using proper versioning. I'll try to push it in for next week ;)

cdavernas avatar May 11 '22 13:05 cdavernas