Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
name: Publish NuGet package

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
release:
types: [published]

env:
ARTIFACTS_FEED_URL: https://api.nuget.org/v3/index.json
Expand All @@ -16,23 +14,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Needed for GitVersion to function correctly

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'

- name: Determine version number with GitVersion
uses: gittools/actions/gitversion/execute@v0.9.7

uses: actions/checkout@v3

- name: Determine version for NuGet package
run: echo NUGET_VERSION=${GITHUB_REF#refs/tags/v} >> $GITHUB_ENV

- name: Replace version number in nuspec files
run: 'sed -i -e "s/{{NuGetVersion}}/$GITVERSION_NUGETVERSION/g" *.nuspec **/*.targets'
run: 'sed -i -e "s/{{NuGetVersion}}/$NUGET_VERSION/g" *.nuspec **/*.targets'

- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.0.5
uses: NuGet/setup-nuget@v1.2.0

- name: Create main package
run: nuget pack Neolution.CodeAnalysis.nuspec
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
publish:
name: build & pack
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Determine version for NuGet package
run: echo NUGET_VERSION=0.$(date '+%Y.%m')-ci.$(date '+%d%H%M%S') >> $GITHUB_ENV

- name: Replace version number in nuspec files
run: 'sed -i -e "s/{{NuGetVersion}}/$NUGET_VERSION/g" *.nuspec **/*.targets'

- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.2.0

- name: Create main package
run: nuget pack Neolution.CodeAnalysis.nuspec

- name: Create TestsRuleset package
run: nuget pack Neolution.CodeAnalysis.TestsRuleset.nuspec
36 changes: 6 additions & 30 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ on:
type: choice
description: Semantic Version Type
options:
- major
- minor
- patch
- no-version-update
- patch
- minor
- major

pre_release:
type: choice
description: Pre Release?
description: Stage
options:
- stable
- alpha
- beta
- rc
- beta
- alpha

jobs:
release-it:
Expand Down Expand Up @@ -65,27 +65,3 @@ jobs:
release-it -y "${params[@]}"
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

- name: Get next release number
run: |
echo "RELEASE_VERSION=$(release-it --release-version --dry-run)" >> $GITHUB_ENV

- name: Print release version
run: echo "The next release number is ${{ env.RELEASE_VERSION }}"

- name: Replace version number in nuspec files
run: 'sed -i -e "s/{{NuGetVersion}}/$GITVERSION_NUGETVERSION/g" *.nuspec'

- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.0.5

- name: Create main package
run: nuget pack Neolution.CodeAnalysis.nuspec

- name: Create TestsRuleset package
run: nuget pack Neolution.CodeAnalysis.TestsRuleset.nuspec

- name: Push all packages to Nuget.org
run: dotnet nuget push --skip-duplicate -s $ARTIFACTS_FEED_URL -k $NUGET_AUTH_TOKEN **/*.nupkg
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY_NEOLUTION }}
39 changes: 0 additions & 39 deletions .github/workflows/dotnet.yml

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and adheres to a project-specific [Versioning](/README.md).

## [Unreleased]

### Added

- Changelog