-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from thygesteffensen/dev
Release
- Loading branch information
Showing
9 changed files
with
256 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
branches: | ||
- name: main | ||
- name: dev | ||
prerelease: alpha | ||
|
||
plugins: | ||
- - "@semantic-release/commit-analyzer" | ||
- preset: conventionalcommits | ||
|
||
- - "@semantic-release/release-notes-generator" | ||
- preset: conventionalcommits | ||
|
||
- - "@semantic-release/github" | ||
- assets: | ||
- path: ../../artifacts/PAMU_CDS.*.nupkg | ||
label: PAMU CDS DLL | ||
|
||
- - "@semantic-release/exec" | ||
- publishCmd: "dotnet nuget push ..\\..\\artifacts\\PAMU_CDSce.*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${process.env.CI_NUGET_API_KEY}" |
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,89 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Testing | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
# - name: Add nuget Source | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# run: nuget sources Add -Name Github -Source https://nuget.pkg.github.com/thygesteffensen/index.json -UserName thygesteffensen -Password $env:GH_TOKEN | ||
|
||
# - name: Set Github nuget API | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# run: nuget setapikey $env:GH_TOKEN -Source https://nuget.pkg.github.com/thygesteffensen/index.json | ||
|
||
- name: Run tests | ||
run: dotnet test --verbosity normal --configuration Release | ||
|
||
release: | ||
name: Releasing | ||
runs-on: windows-latest | ||
needs: | ||
- test | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Add plugin for conventional commits | ||
run: npm install conventional-changelog-conventionalcommits | ||
working-directory: ./.github/workflows | ||
|
||
- name: Add plugin for executing bash commands | ||
run: npm install @semantic-release/exec -D | ||
working-directory: ./.github/workflows | ||
|
||
- name: Dry Run Semantic to get next Version nummber | ||
working-directory: ./.github/workflows | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GIT_AUTHOR_NAME: thygesteffensen | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
run: | | ||
echo "RELEASE_VERSION=$((npx semantic-release --dry-run).Where({ $_ -like '*Release note*' }) | Out-String | Select-String '[0-9]+\.[0-9]+\.[0-9]+([-][a-zA-z]+[.][0-9]*)?' | % { $_.Matches } | % { $_.Value })" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Print release verison | ||
run: echo ${env:RELEASE_VERSION} | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
# - name: Add nuget Source | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# run: nuget sources Add -Name Github -Source https://nuget.pkg.github.com/thygesteffensen/index.json -UserName thygesteffensen -Password $env:GH_TOKEN | ||
|
||
# - name: Set Github nuget API | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# run: nuget setapikey $env:GH_TOKEN -Source https://nuget.pkg.github.com/thygesteffensen/index.json | ||
|
||
- name: Restore NuGet packages | ||
run: dotnet restore PAMU_CDS.sln /p:Configuration=Release | ||
|
||
- name: Package PAMU | ||
run: msbuild /t:pack /p:PackageVersion=${env:RELEASE_VERSION} /p:Configuration=Release /p:OutputPath=..\\artifacts | ||
if: ${{ env.RELEASE_VERSION }} | ||
|
||
- name: Release to GitHub | ||
working-directory: .\\.github\\workflows | ||
env: | ||
CI_NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GIT_AUTHOR_NAME: thygesteffensen | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
run: npx semantic-release |
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
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
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
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,74 @@ | ||
{ | ||
"properties": { | ||
"connectionReferences": { | ||
"shared_commondataserviceforapps": { | ||
"runtimeSource": "embedded", | ||
"connection": { | ||
"connectionReferenceLogicalName": "demo_sharedcommondataserviceforapps_232e6" | ||
}, | ||
"api": { | ||
"name": "shared_commondataserviceforapps" | ||
} | ||
} | ||
}, | ||
"definition": { | ||
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"$connections": { | ||
"defaultValue": {}, | ||
"type": "Object" | ||
}, | ||
"$authentication": { | ||
"defaultValue": {}, | ||
"type": "SecureObject" | ||
} | ||
}, | ||
"triggers": { | ||
"Create_account": { | ||
"metadata": { | ||
"operationMetadataId": "10031c6a-2d9a-4c03-bb5e-296bfaa145a7" | ||
}, | ||
"type": "OpenApiConnectionWebhook", | ||
"inputs": { | ||
"host": { | ||
"connectionName": "shared_commondataserviceforapps", | ||
"operationId": "SubscribeWebhookTrigger", | ||
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps" | ||
}, | ||
"parameters": { | ||
"subscriptionRequest/message": 1, | ||
"subscriptionRequest/entityname": "account", | ||
"subscriptionRequest/scope": 4 | ||
}, | ||
"authentication": "@parameters('$authentication')" | ||
} | ||
} | ||
}, | ||
"actions": { | ||
"Create_contact": { | ||
"runAfter": {}, | ||
"metadata": { | ||
"operationMetadataId": "440263ff-5e40-4e1c-b4a6-3e16d0226cf0" | ||
}, | ||
"type": "OpenApiConnection", | ||
"inputs": { | ||
"host": { | ||
"connectionName": "shared_commondataserviceforapps", | ||
"operationId": "CreateRecord", | ||
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps" | ||
}, | ||
"parameters": { | ||
"entityName": "contacts", | ||
"item/lastname": "Default", | ||
"item/[email protected]": "accounts(@{triggerOutputs()?['body/accountid']})" | ||
}, | ||
"authentication": "@parameters('$authentication')" | ||
} | ||
} | ||
} | ||
}, | ||
"templateName": "" | ||
}, | ||
"schemaVersion": "1.0.0.0" | ||
} |