8000 chore: Extract release workflow for automated NuGet package publishing with release-drafter action by Riges · Pull Request #179 · Riges/Netatmo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: Extract release workflow for automated NuGet package publishing with release-drafter action #179

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

Merged
merged 7 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
commitish: master
name-template: "Release $RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
template: |
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/ci.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
tags:
- v*.*.*

jobs:
Publish:
name: Create NuGet Package
runs-on: ubuntu-latest
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Get the version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
echo "VERSION=${version}" >> $GITHUB_ENV
echo "version=${version}" >> $GITHUB_OUTPUT
echo "TAG=${tag}" >> $GITHUB_ENV
echo "tag=${tag}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Restore packages
run: dotnet restore --locked-mode
- name: Test
run: dotnet test --configuration Release
- name: Build NuGet Package
run: dotnet pack -c Release -p:PackageVersion="${{ env.VERSION }}" --output ./output
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: Netatmo.${{ env.VERSION }}.nupkg
path: './output/Netatmo.${{ env.VERSION }}.nupkg'
- name: Push package
run: dotnet nuget push ./output/Netatmo.${{ env.VERSION }}.nupkg -k ${{ secrets.NUGET_ORG_KEY }} -s https://api.nuget.org/v3/index.json

- uses: release-drafter/release-drafter@v6
with:
version: ${{ steps.version.outputs.version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
0