This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c49667
commit 84d43b1
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release SDK | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# SDK release is done from public/master branch. | ||
confirm-master-branch: | ||
name: Confirm release is run on public/master branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
- name: Branch name | ||
run: | | ||
BRANCHNAME=${GITHUB_REF##*/} | ||
echo "pulling branch name, branch name is:" | ||
echo $BRANCHNAME | ||
if [ $BRANCHNAME != "master" ] | ||
then | ||
echo "You can only run a release from the master branch, you are trying to run it from ${BRANCHNAME}" | ||
exit 1 | ||
fi | ||
# All new code is stored in internal/development. Release from public/master will merge changes from internal/development into | ||
# public/master, then run semantic-release on public/master to update changelog and release notes. Before semantic-release publishes | ||
# to npm, it builds the dist/ folder. Finally, commits from public/master are synced back to internal/master and internal/development. | ||
|
||
release-to-nuget: | ||
name: Release and Sync Repos | ||
runs-on: macos-latest | ||
needs: ['confirm-master-branch'] | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
- name: Build artifacts | ||
run: ./build.sh | ||
- name: Release to Nuget | ||
run: nuget push *.nupkg ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
nuget restore | ||
msbuild Bindings/mParticle.Xamarin.AndroidBinding/mParticle.Xamarin.AndroidBinding.csproj /p:Configuration=Release /t:Rebuild | ||
msbuild Bindings/mParticle.Xamarin.iOSBinding/mParticle.Xamarin.iOSBinding.csproj /p:Configuration=Release /t:Rebuild | ||
msbuild Library/mParticle.Xamarin/mParticle.Xamarin.csproj /p:Configuration=Release /t:Rebuild | ||
msbuild Library/mParticle.Xamarin.Abstractions/mParticle.Xamarin.Abstractions.csproj /p:Configuration=Release /t:Rebuild | ||
msbuild Library/mParticle.Xamarin.Android/mParticle.Xamarin.Android.csproj /p:Configuration=Release /t:Rebuild | ||
msbuild Library/mParticle.Xamarin.iOS/mParticle.Xamarin.iOS.csproj /p:Configuration=Release /t:Rebuild | ||
|
||
msbuild Samples/mParticle.Xamarin.Android.Sample/mParticle.Xamarin.Android.Sample.csproj /p:Configuration=Debug /t:Rebuild | ||
msbuild Samples/mParticle.Xamarin.Forms.Sample.Droid/mParticle.Xamarin.Forms.Sample.Droid.csproj /p:Configuration=Debug /t:Rebuild | ||
msbuild Samples/mParticle.Xamarin.Forms.Sample.iOS/mParticle.Xamarin.Forms.Sample.iOS.csproj /p:Configuration=Debug /t:Rebuild | ||
msbuild Samples/mParticle.Xamarin.iOS.Sample/mParticle.Xamarin.iOS.Sample.csproj /p:Configuration=Debug /t:Rebuild | ||
|
||
nuget pack Library/mparticle.nuspec |