Skip to content

Commit 67876e7

Browse files
committed
build: new approach to cutting releases
Signed-off-by: Andrew Berezovskyi <[email protected]>
1 parent aac218b commit 67876e7

File tree

3 files changed

+27
-19
lines changed

3 files changed

+27
-19
lines changed

.github/workflows/main.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ on:
1111
release:
1212
types:
1313
- published # Run the workflow when a new GitHub release is published
14-
workflow_dispatch:
15-
inputs:
16-
release:
17-
description: "Make the release build"
18-
required: false
19-
type: boolean
20-
default: false
14+
# workflow_dispatch:
15+
# inputs:
16+
# release:
17+
# description: "Make the release build"
18+
# required: false
19+
# type: boolean
20+
# default: false
21+
# version:
22+
# description: "Version string"
23+
# required: true
24+
# type: string
2125

2226
env:
2327
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
@@ -43,6 +47,7 @@ jobs:
4347
working-directory: OSLC4Net_SDK/
4448
env:
4549
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
50+
# TAG_VALUE: ${{ github.ref_name || inputs.version }}
4651
steps:
4752
- name: Checkout Code
4853
uses: actions/checkout@v4
@@ -98,19 +103,20 @@ jobs:
98103
- name: Pack NuGet packages (snapshot)
99104
shell: pwsh
100105
run: |
101-
dotnet pack -c Release --version-suffix "ts.$(Get-Date -Format 'yyyyMMddHHmm')" -o ${{ env.NuGetDirectory }}
106+
dotnet pack -c Release -o ${{ env.NuGetDirectory }}
102107
if: |
103108
success() && github.ref == 'refs/heads/main'
104109
&& matrix.version.target == 'net8.0' && matrix.os == 'windows-latest'
105-
&& ! (github.event_name == 'release' || inputs.release )
110+
&& ! ( github.event_name == 'release' || inputs.release)
106111
- name: Pack NuGet packages (release)
107112
shell: pwsh
108113
run: |
109-
dotnet pack -c Release -o ${{ env.NuGetDirectory }}
114+
$env:GITHUB_REF -match '^refs/tags/v(.*)$' | Set-Variable VERSION $matches[1]
115+
dotnet pack -c Release -p:RELEASE_VERSION=$VERSION -o ${{ env.NuGetDirectory }}
110116
if: |
111117
success()
112118
&& matrix.version.target == 'net8.0' && matrix.os == 'windows-latest'
113-
&& (github.event_name == 'release' || inputs.release )
119+
&& ( github.event_name == 'release' || inputs.release )
114120
- uses: actions/upload-artifact@v4
115121
with:
116122
name: nuget

CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
Legend: 🔒️ security fixes; ⚡️ major features/updates; ❗️ breaking changes; 👉 important notes.
99

10-
## [0.4.4] - 2024-10-19
10+
## [0.4.5] - 2024-10-19
1111

1212
### Security
1313

@@ -37,6 +37,10 @@ This release does not introduce deprecations.
3737

3838
- Example and test project had `<IsPackable>false</IsPackable>` property set to prevent pushing their packages to NuGet.
3939

40+
## [0.4.4] - 2024-10-19
41+
42+
YANKED - deploy to NuGet.org did not succeed.
43+
4044
## [0.4.3] - 2024-10-19
4145

4246
### Security
@@ -210,7 +214,8 @@ This release does not remove any features.
210214
This release does not contain bug fixes.
211215

212216

213-
[UNRELEASED]: https://github.com/OSLC/oslc4net/compare/v0.4.4...HEAD
217+
[UNRELEASED]: https://github.com/OSLC/oslc4net/compare/v0.4.5...HEAD
218+
[0.4.5]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.5
214219
[0.4.4]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.4
215220
[0.4.3]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.3
216221
[0.4.2]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.2

OSLC4Net_SDK/Directory.Build.props

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<Project>
22
<PropertyGroup>
3-
<VersionPrefix>0.4.3</VersionPrefix>
4-
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
5-
<!-- <VersionSuffix>alpha</VersionSuffix> -->
6-
<!-- <AssemblyVersion>1.0.0.0</AssemblyVersion>
7-
<FileVersion>1.0.0.0</FileVersion> -->
3+
<Version Condition="'$(RELEASE_VERSION)' != ''">$(RELEASE_VERSION)</Version>
4+
<VersionPrefix Condition="'$(RELEASE_VERSION)' == ''">999.9.9</VersionPrefix>
5+
<VersionSuffix Condition="'$(RELEASE_VERSION)' == ''">ts.$([System.DateTime]::UtcNow.ToString(`yyyyMMddHHmm`))</VersionSuffix>
86
<PackageLicenseExpression>EPL-1.0</PackageLicenseExpression>
97
<Authors>Andrii Berezovskyi and OSLC4Net contributors</Authors>
10-
<!-- <Copyright>Copyright © 2023 Andrii Berezovskyi and OSLC4Net contributors; 2012 IBM</Copyright> -->
118
<PackageReadmeFile>README.md</PackageReadmeFile>
129
<PackageProjectUrl>https://github.com/OSLC/oslc4net/</PackageProjectUrl>
1310
<RepositoryUrl>https://github.com/OSLC/oslc4net/</RepositoryUrl>

0 commit comments

Comments
 (0)