Skip to content

Commit 38e07af

Browse files
committed
Update workflow branch conditions and add GITHUB_TOKEN
Added GITHUB_TOKEN to environment variables. Changed deployRelease job to trigger on 'release' branch instead of 'main'. Commented out deployTest job condition for non-main branches.
1 parent 17877fb commit 38e07af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/dotnet.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: .NET build and test
22
env:
33
CURRENT_VERSION: 1.0.${{ github.run_number }}
44
LAST_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
5+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56

67
on:
78
push:
8-
pull_request:
99

1010
jobs:
1111
build:
@@ -27,7 +27,7 @@ jobs:
2727
run: dotnet test --no-build --verbosity normal --configuration Release
2828

2929
deployRelease:
30-
if: github.ref == 'refs/heads/main'
30+
if: github.ref == 'refs/heads/release'
3131
runs-on: ubuntu-latest
3232
needs: build
3333
permissions:
@@ -61,7 +61,7 @@ jobs:
6161
exit 1
6262
}
6363
deployTest:
64-
if: github.ref != 'refs/heads/main'
64+
# if: github.ref == 'refs/heads/main'
6565
runs-on: ubuntu-latest
6666
needs: build
6767
steps:

0 commit comments

Comments
 (0)