Skip to content

Commit

Permalink
🤖 update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MorganKryze committed Mar 3, 2024
1 parent 7f17705 commit 729ccaf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish package

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Verify commit exists in origin/main
run: git branch --remote --contains | grep origin/main
- name: Extract release notes
run: |
git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Pack library
run: dotnet pack src/ConsoleAppVisuals/ConsoleAppVisuals.csproj /p:Version=${VERSION} /p:ContinuousIntegrationBuild=true --output .
env:
GITHUB_ACTIONS: true
GITHUB_ACTION: 'publish'
- name: Push to GitHub Packages
run: dotnet nuget push ConsoleAppVisuals.${VERSION}.nupkg --source https://nuget.pkg.github.com/MorganKryze/index.json --api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push to NuGet.org
run: dotnet nuget push ConsoleAppVisuals.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI and docs
name: Build, test and deploy docs

env:
ACTIONS_RUNNER_NODE20: true
Expand Down

0 comments on commit 729ccaf

Please sign in to comment.