TheBoneJarmer / TiledCS

TiledCS is a dotnet library for loading Tiled tilesets and maps
MIT License
139 stars 51 forks source link

Generate symbols for SourceLink #91

Closed iCodeSometime closed 2 years ago

iCodeSometime commented 2 years ago

The existing publish script will now upload a snupkg symbol package alongside the nupkg.

This will allow developers to step into the source of this package if necessary when debugging.

https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg

TheBoneJarmer commented 2 years ago

Hey @iCodeSometime

Sorry for the late reply. I honestly never heard of this before so thanks for teaching me something new! I was aware of pdb files but not about this. Changes is looking good! However.. I do not allow merging directly into my main branch as my main branch is my stable one... But I am kinda tired of asking this to people and I wish GH somehow could block this off. That said, at the moment of opening this PR main was at the same commit as develop so I allow it this time.

With kind regards, TheBoneJarmer

iCodeSometime commented 1 year ago

Sorry about that, I should have checked the readme first, I'll get it right next time.

The snupkg thing is fairly new, but it's pretty convenient to be able to step in to external libraries without having to do any setup

iCodeSometime commented 1 year ago

Hey, I created a workflow you can use if you like. You can just paste it into a new action - should be free since it's a public repo.

Once it's installed, if anyone other than you opens a PR merging into main, it'll comment "Pull requests may not be created against the main branch. Updating the branch target to develop - make sure to fix any merge errors. See the contribution guidelines for more info." It then automatically updates the target branch to "develop", where Github will recheck if it merges cleanly. Maybe this can cut down on some annoyance for you.

Appreciate you, iCodeSometime

on:
  pull_request:
    types: [opened]
job:
  update-pr-target:
    if: ${{ github.base_ref == 'main' && github.actor != 'TheBoneJarmer' }}
    steps:
      - name: Comment about wrong branch
        uses: actions/github-script@v5
        with:
          script: |
            github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: 'Pull requests may not be created against the main branch. Updating the branch target to develop - make sure to fix any merge errors. See [contribution guidelines](https://github.com/TheBoneJarmer/TiledCS#contribution) for more info.'
            })
      - name: Update PR target branch
        uses: actions/github-script@v5
        with:
          script: |
            github.rest.pulls.update({
              pull_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              base: 'develop'
            })