Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorFZ committed Aug 23, 2023
1 parent bf533cc commit 0fa53b4
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Test and Publish

on:
pull_request_target:
types:
- closed
branches:
- 'master'
push:
branches: [ master ]

defaults:
run:
shell: bash
Expand Down Expand Up @@ -40,16 +38,14 @@ jobs:
needs: test
env:
LAST_COMMITTER_EMAIL: $(git log -1 --pretty=format:'%ae')
BOT_NAME: Bornlogic Bot
BOT_EMAIL: [email protected]
BOT_TOKEN: secrets.BOT_ACCESS_TOKEN
BOT_NAME: Actions
BOT_EMAIL: [email protected]

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ env.BOT_TOKEN }}

- name: Install .NET Core for Versionize
uses: actions/setup-dotnet@v1
Expand All @@ -70,11 +66,10 @@ jobs:
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:${{ env.BOT_TOKEN }}@github.com/$GITHUB_REPOSITORY
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_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
Expand All @@ -86,4 +81,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

0 comments on commit 0fa53b4

Please sign in to comment.