Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add autobuild/push Nuget packages #2

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,20 @@ jobs:
- name: ref
run: echo "github.head_ref 1 ${{ github.head_ref }} 2 $GITHUB_REF 3 ${{ github.ref }}"

# - name: Create Tag
# uses: rickstaa/[email protected]
# with:
# tag: v${{ env.semVer }}

- name: Create git Tag
if: ${{ contains('refs/heads/hotfix', github.ref) || contains('refs/heads/hotfix', github.ref) || contains('refs/heads/master', github.ref) }}
# if: ${{ contains(fromJson('["refs/heads/master", "refs/heads/release", "refs/heads/hotfix"]'), github.ref) }}
run: |
git tag v${{ env.semVer }}

# - name: Push git tag
# run: git push origin v${{ env.semVer }}

- name: Push git Tag
if: ${{ contains(fromJson('["refs/heads/master", "refs/heads/release", "refs/heads/hotfix"]'), github.ref) }}
run: |
Expand All @@ -79,6 +88,23 @@ jobs:
git remote set-url origin https://x-access-token:${{ secrets.TAGTOKEN }}@github.com/${{ github.repository }}
git push origin v${{ env.semVer }}

# - name: Tag commit
# uses: tvdias/[email protected]
# with:
# repo-token: "${{ secrets.GITHUB_TOKEN }}"
# tag: "v${{ env.semVer }}"

# - name: Create tag
# uses: actions/github-script@v5
# with:
# script: |
# github.rest.git.createRef({
# owner: context.repo.owner,
# repo: context.repo.repo,
# ref: 'refs/tags/v${{env.semVer}}',
# sha: context.sha
# })

- name: Nuget Push
if: ${{ !startsWith(github.ref, 'refs/pull') }}
run: nuget push **/Serilog.Enrichers.HttpContext.${{ env.semVer }}.symbols.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source "https://api.nuget.org/v3/index.json" -SkipDuplicate
Loading