Skip to content

Commit

Permalink
chore: cicd updates
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanJosipovic committed Feb 15, 2021
1 parent 5148e09 commit d2c9363
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
branches:
- '*'
- '!master'
- '!beta'

name: CI/CD
jobs:
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
branches:
- master
- beta

name: Create Release
jobs:
Expand All @@ -23,6 +24,7 @@ jobs:
run: dotnet publish -c Release

- name: Deploy to Production
if: github.ref == 'refs/heads/master'
uses: netlify/actions/cli@master
with:
args: deploy --prod --json -d src/BlazorApplicationInsights.Sample/bin/Release/netstandard2.1/publish/wwwroot
Expand All @@ -31,10 +33,26 @@ jobs:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

- name: Set Test Address
if: github.ref == 'refs/heads/master'
run: |
Set-Content -Path "src/BlazorApplicationInsights.Tests/BrowserTestsAddress.config" -Value "${{ steps.netlify.outputs.NETLIFY_LIVE_URL }}";
shell: pwsh

- name: Deploy to Staging
if: github.ref == 'refs/heads/beta'
uses: netlify/actions/cli@master
with:
args: deploy --json -d src/BlazorApplicationInsights.Sample/bin/Release/netstandard2.1/publish/wwwroot
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

- name: Set Test Address
if: github.ref == 'refs/heads/beta
run: |
Set-Content -Path "src/BlazorApplicationInsights.Tests/BrowserTestsAddress.config" -Value "${{ steps.netlify.outputs.NETLIFY_URL }}";
shell: pwsh

- name: Run Tests
working-directory: src/BlazorApplicationInsights.Tests
run: dotnet test --configuration Release
Expand Down
1 change: 0 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"branches": ["master", "main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand Down

0 comments on commit d2c9363

Please sign in to comment.