updated readme file name #6
Workflow file for this run
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
name: Publish Package | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Get Version | |
id: version | |
shell: bash | |
run: | | |
VERSION=${GITHUB_REF#refs/tags/v} | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "version-without-v=$VERSION" >> $GITHUB_OUTPUT | |
- name: Pack | |
run: dotnet pack --configuration Release /p:Version=${{ steps.version.outputs.version-without-v }} -p:PackageId=BCat.Hosting.MinIO --output . | |
# Add GitHub Packages source | |
- name: Add GitHub Source | |
run: | | |
dotnet nuget add source --username jacobwi --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jacobwi/index.json" | |
# Push to GitHub Packages | |
- name: Push to GitHub Packages | |
run: | | |
dotnet nuget push *.nupkg --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | |
# Push to NuGet.org | |
- name: Push to NuGet | |
run: | | |
dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "*.nupkg" | |
name: Release ${{ steps.version.outputs.version }} | |
draft: true | |
allowUpdates: true |