Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up GitHub Actions #174

Merged
merged 7 commits into from Apr 3, 2024
Merged

Conversation

nblumhardt
Copy link
Contributor

@nblumhardt nblumhardt commented Mar 26, 2024

This setup is via https://github.com/serilog-tracing/serilog-tracing.

I've gone for the quickest thing I could pull together, happy to tweak it here, or just merge/debug and leave it in your hands, @EEParker and @VictorioBerra :-)

Closes #173

- name: Build and Publish
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who has access to this repositories secrets? It looks like that will be required to make this work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've set this one up already 👍

dotnet-version: 8.0.x
- name: Compute build number
run: |
echo "CI_BUILD_NUMBER=$(($CI_BUILD_NUMBER_BASE+200))" >> $GITHUB_ENV
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why +200?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it is just to keep this incrementing and not start at 0.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks

@EEParker
Copy link
Collaborator

EEParker commented Mar 26, 2024

This looks like a good start, I would also like to add something to generate release notes for tags (release versions) and use the tag name as the version number to publish to nuget.

For example:

ci-release.yml

on:
  push:
    tags:
    - '*'

# [ include content from dev build ci] [...]
    steps:
   # [...]
   - name: Create Release
      uses: ncipollo/release-action@v1
      with: 
        artifacts: "*.nupkg"
        generateReleaseNotes: true

.gitignore Outdated
.DS_Store
.gitignore
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can .idea/ be added to .gitignore instead of ignoring .gitignore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh :-) - fixed 👍

@nblumhardt
Copy link
Contributor Author

Hopefully what's there is enough to get the ball rolling now; generating release notes and using tags would be a nice improvement, unfortunately I don't have the time to roll that into this PR, but happy helping anywhere I'm needed down the line.

@EEParker
Copy link
Collaborator

Looks good, thanks for the help.

@VictorioBerra
Copy link
Member

What do we think about this @EEParker? When can we test our first NuGet deployment with Actions?

@EEParker
Copy link
Collaborator

EEParker commented Apr 3, 2024

I have one small change I want to make to this, but it can be done after the merge. I want to add a separate ci for automatic releases on tags. Dev/main/master can use the branch name and build number for the pre release version.

@EEParker
Copy link
Collaborator

EEParker commented Apr 3, 2024

@VictorioBerra I have added my changes to this PR. I was able to test Build.ps1 successfully locally, but we will have to run it here to see if the actions work.

I am ready for this to be merged. It should generate a prerelease 4.0.0 build.

@EEParker EEParker added enhancement Semver-Major Major Update - breaking changes Semver-Minor Minor Update - non-breaking changes and removed Semver-Major Major Update - breaking changes Semver-Minor Minor Update - non-breaking changes labels Apr 3, 2024
@EEParker EEParker added this to the 4.0 milestone Apr 3, 2024
@EEParker EEParker merged commit 55d211c into serilog-contrib:dev Apr 3, 2024
@EEParker
Copy link
Collaborator

EEParker commented Apr 3, 2024

image

@nblumhardt
Copy link
Contributor Author

Good luck with the project, @EEParker and @VictorioBerra. I'll tune out regular traffic on this repo, but please @ me anytime I can help :-)

@EEParker
Copy link
Collaborator

EEParker commented Apr 3, 2024

Thank you for your assistance!

@VictorioBerra
Copy link
Member

Thank you!!

EEParker added a commit that referenced this pull request Apr 3, 2024
* Bump System.Net.Http from 4.3.3 to 4.3.4 in /sample/Sample

Bumps System.Net.Http from 4.3.3 to 4.3.4.

Signed-off-by: dependabot[bot] <support@github.com>

* Bump System.Net.Http from 4.3.0 to 4.3.4 in /src/Serilog.Sinks.Splunk

Bumps System.Net.Http from 4.3.0 to 4.3.4.

Signed-off-by: dependabot[bot] <support@github.com>

* Bump System.Net.Http in /test/Serilog.Sinks.Splunk.Tests

Bumps System.Net.Http from 4.3.3 to 4.3.4.

Signed-off-by: dependabot[bot] <support@github.com>

* Bump System.Net.Http from 4.3.0 to 4.3.4 in /src/Serilog.Sinks.UDP

Bumps System.Net.Http from 4.3.0 to 4.3.4.

Signed-off-by: dependabot[bot] <support@github.com>

* add default batch config

* Update expired GitHub Key

* add default batch config

* Update expired GitHub Key

* fix bug dispose (#153)

* Regenerate API Key for NuGet

* Splunk 9.1 + .NET 6 (#166)

* Sample: Target net6.0. Added additional logging statements.

* Docker: Splunk 9.1.

* Tests: Target net6.0 and updated nuget packages.

* Added constant for services/collector. Event request trims / from uri. Updated collector URL for Splunk 9.1

* Update to serilog periodic batching 4.x (#168)

* Updated dependencies to Serilog 3.1 and Periodic Batching Sink to 4.0.0

* Update version to 4.0.0 due to the breaking constructor changes on the EventCollectorSink

* Update Dockerfile with net6.0 versions

* Use the latest version of Splunk

The 7.2 label does not appear to be available anymore.

* Add in missing build for net6.0

* Use forward slash for ignore

This should work on Windows as well

* Use the same Framework reference for the sample

Everything else is using at least net6.0 so the Sample should as well

---------

Co-authored-by: Justin Pfifer <justin.pfifer@carvana.com>
Co-authored-by: Jeff Parker, PE <EEParker@users.noreply.github.com>

* dotnet 8.0 updates (#171)

* Feature/161 subsecond decimals (#172)

* Fixes #161 add subsecond decimal configuration

* Fixes #167 Add a flag for RenderedMessage

* Update SubSecondPrecision to use an enum.

Based on 3,6,9 decimals, see
https://docs.splunk.com/Documentation/Splunk/9.2.0/SearchReference/Commontimeformatvariables

* Add unit tests and update documentation

* Invert renderMessage check

* Update sample docker-compose project

- add new tests
- add a docker-compose vscode project
- allow subsecond precision.

* Add comment for configuring splunk

* Fix formatting for nanoseconds

* Enable all tests in sample app

---------

Co-authored-by: Victorio Berra <toryberra@gmail.com>

* Set up GitHub Actions (#174)

* Enable GitHub Actions

* Main branch is called master in this repo

* Ignore .idea

* No need to offset builds by 200

* work on build for new project format

* add automatic release notes

---------

Co-authored-by: EEParker <EEParker@users.noreply.github.com>

* Filter branches that push to nuget (#177)

* Security Policy, scanning and dependency updates (#176)

* Add dependabot configuration

* Add codeql

* Add security policy

* Update dependabot.yml add newline

* update branches

* Update SECURITY.md

* Readme and package license fix

* Update dotnet pack command line

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthew Erbs <matthew.erbs@merbla.com>
Co-authored-by: Mohsen Rajabi <m.kabir8895@gmail.com>
Co-authored-by: Havagan <Havagan@users.noreply.github.com>
Co-authored-by: Justin Pfifer <61801015+jpfifer@users.noreply.github.com>
Co-authored-by: Justin Pfifer <justin.pfifer@carvana.com>
Co-authored-by: Victorio Berra <toryberra@gmail.com>
Co-authored-by: Nicholas Blumhardt <nblumhardt@nblumhardt.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Appveyor/Nuget Package Release
3 participants