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 release workflow #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ScottRudiger
Copy link
Contributor

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.

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
Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link
Contributor Author

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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants