-
Notifications
You must be signed in to change notification settings - Fork 23
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 release workflow #43
base: master
Are you sure you want to change the base?
Conversation
cp src/Taxjar/bin/Release/net452/TaxJar.dll build/net452 | ||
- name: Create NuGet package | ||
run: | | ||
sed -i 's/^\(\s*\)<TargetFrameworks>.*$/\1<TargetFrameworks>netstandard2.0;net452<\/TargetFrameworks>/' src/Taxjar/Taxjar.csproj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this line is necessary, but it's included in our current release procedures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure what this is. Is this maybe adding the multi-targeting line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codymullins Exactly. It's just resetting src/Taxjar/Taxjar.csproj
to <TargetFrameworks>netstandard2.0;net456</TargetFrameworks>
. I just wasn't sure that's strictly necessary before running the next step: mono build/nuget.exe pack build/TaxJar.nuspec
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine.
sed -i 's/^\(\s*\)<TargetFrameworks>.*$/\1<TargetFrameworks>netstandard2.0;net452<\/TargetFrameworks>/' src/Taxjar/Taxjar.csproj | ||
mono build/nuget.exe pack build/TaxJar.nuspec | ||
- name: Publish NuGet package | ||
run: mono build/nuget.exe push TaxJar.$TAXJAR_VERSION.nupkg ${{ secrets.NUGET_API_TOKEN }} -Source https://www.nuget.org/api/v2/package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fastdivision To make this work, you'll need to add our API token for NuGet here: https://github.com/taxjar/taxjar.net/settings/secrets
|
This PR sets up a GitHub Actions workflow for releasing new versions of taxjar.net to NuGet.
The workflow automates the manual release procedures documented here. Going forward, new NuGet packages will be published simply by pushing a tag to GitHub. This should save time on future releases and make the process less prone to human error.