-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f17705
commit 729ccaf
Showing
2 changed files
with
35 additions
and
1 deletion.
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 |
---|---|---|
@@ -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}} |
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,4 +1,4 @@ | ||
name: CI and docs | ||
name: Build, test and deploy docs | ||
|
||
env: | ||
ACTIONS_RUNNER_NODE20: true | ||
|