forked from IdentityServer/IdentityServer4
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #26 from bornlogic/fix/ci
main
- Loading branch information
Showing
5 changed files
with
15 additions
and
14 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
name: Test and Publish | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
pull_request_target: | ||
types: | ||
- closed | ||
branches: | ||
- 'master' | ||
defaults: | ||
run: | ||
shell: bash | ||
|
@@ -38,14 +40,14 @@ jobs: | |
needs: test | ||
env: | ||
LAST_COMMITTER_EMAIL: $(git log -1 --pretty=format:'%ae') | ||
BOT_NAME: Actions | ||
BOT_EMAIL: [email protected] | ||
BOT_TOKEN: secrets.BOT_ACCESS_TOKEN | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.BOT_ACCESS_TOKEN }} | ||
|
||
- name: Install .NET Core for Versionize | ||
uses: actions/setup-dotnet@v1 | ||
|
@@ -62,14 +64,13 @@ jobs: | |
run: dotnet build --configuration Release | ||
|
||
- name: Increment Version | ||
if: ${{ success() && env.LAST_COMMITTER_EMAIL != env.BOT_EMAIL }} | ||
if: ${{ success() }} | ||
run: | | ||
git config --global user.name ${{ env.BOT_NAME }} | ||
git config --global user.email ${{ env.BOT_EMAIL }} | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git remote set-url origin https://x-access-token:${{ env.BOT_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git checkout "${GITHUB_REF:11}" | ||
dotnet tool install --global Versionize --version 1.8.0 | ||
versionize --skip-dirty && git push --follow-tags origin "${GITHUB_REF:11}" | ||
- name: Pack | ||
if: ${{ success() }} | ||
run: dotnet pack --configuration Release -o output | ||
|
@@ -81,4 +82,4 @@ jobs: | |
dotnet nuget push "output/*.nupkg" \ | ||
--source https://nuget.pkg.github.com/bornlogic/index.json \ | ||
--api-key ${{ secrets.GITHUB_TOKEN }} \ | ||
--skip-duplicate --no-symbols | ||
--skip-duplicate --no-symbols |
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