Skip to content

Commit

Permalink
build: new approach to cutting releases
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <[email protected]>
  • Loading branch information
berezovskyi committed Oct 19, 2024
1 parent aac218b commit 67876e7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ on:
release:
types:
- published # Run the workflow when a new GitHub release is published
workflow_dispatch:
inputs:
release:
description: "Make the release build"
required: false
type: boolean
default: false
# workflow_dispatch:
# inputs:
# release:
# description: "Make the release build"
# required: false
# type: boolean
# default: false
# version:
# description: "Version string"
# required: true
# type: string

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
Expand All @@ -43,6 +47,7 @@ jobs:
working-directory: OSLC4Net_SDK/
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
# TAG_VALUE: ${{ github.ref_name || inputs.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand Down Expand Up @@ -98,19 +103,20 @@ jobs:
- name: Pack NuGet packages (snapshot)
shell: pwsh
run: |
dotnet pack -c Release --version-suffix "ts.$(Get-Date -Format 'yyyyMMddHHmm')" -o ${{ env.NuGetDirectory }}
dotnet pack -c Release -o ${{ env.NuGetDirectory }}
if: |
success() && github.ref == 'refs/heads/main'
&& matrix.version.target == 'net8.0' && matrix.os == 'windows-latest'
&& ! (github.event_name == 'release' || inputs.release )
&& ! ( github.event_name == 'release' || inputs.release)
- name: Pack NuGet packages (release)
shell: pwsh
run: |
dotnet pack -c Release -o ${{ env.NuGetDirectory }}
$env:GITHUB_REF -match '^refs/tags/v(.*)$' | Set-Variable VERSION $matches[1]
dotnet pack -c Release -p:RELEASE_VERSION=$VERSION -o ${{ env.NuGetDirectory }}
if: |
success()
&& matrix.version.target == 'net8.0' && matrix.os == 'windows-latest'
&& (github.event_name == 'release' || inputs.release )
&& ( github.event_name == 'release' || inputs.release )
- uses: actions/upload-artifact@v4
with:
name: nuget
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

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

### Security

Expand Down Expand Up @@ -37,6 +37,10 @@ This release does not introduce deprecations.

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

## [0.4.4] - 2024-10-19

YANKED - deploy to NuGet.org did not succeed.

## [0.4.3] - 2024-10-19

### Security
Expand Down Expand Up @@ -210,7 +214,8 @@ This release does not remove any features.
This release does not contain bug fixes.


[UNRELEASED]: https://github.com/OSLC/oslc4net/compare/v0.4.4...HEAD
[UNRELEASED]: https://github.com/OSLC/oslc4net/compare/v0.4.5...HEAD
[0.4.5]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.5
[0.4.4]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.4
[0.4.3]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.3
[0.4.2]: https://github.com/OSLC/oslc4net/releases/tag/v0.4.2
Expand Down
9 changes: 3 additions & 6 deletions OSLC4Net_SDK/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<Project>
<PropertyGroup>
<VersionPrefix>0.4.3</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<!-- <VersionSuffix>alpha</VersionSuffix> -->
<!-- <AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion> -->
<Version Condition="'$(RELEASE_VERSION)' != ''">$(RELEASE_VERSION)</Version>
<VersionPrefix Condition="'$(RELEASE_VERSION)' == ''">999.9.9</VersionPrefix>
<VersionSuffix Condition="'$(RELEASE_VERSION)' == ''">ts.$([System.DateTime]::UtcNow.ToString(`yyyyMMddHHmm`))</VersionSuffix>
<PackageLicenseExpression>EPL-1.0</PackageLicenseExpression>
<Authors>Andrii Berezovskyi and OSLC4Net contributors</Authors>
<!-- <Copyright>Copyright © 2023 Andrii Berezovskyi and OSLC4Net contributors; 2012 IBM</Copyright> -->
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/OSLC/oslc4net/</PackageProjectUrl>
<RepositoryUrl>https://github.com/OSLC/oslc4net/</RepositoryUrl>
Expand Down

0 comments on commit 67876e7

Please sign in to comment.