Skip to content

Commit

Permalink
Update versioning for pre-release (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromemanzano committed Mar 7, 2023
1 parent 8e492e2 commit 7c3e357
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 45 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/win-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,18 @@ jobs:
# TODO: support other RuntimeIdentifiers
RuntimeIdentifier: win-x64

- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: 'Get next minor version'
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
- name: 'Update version'
id: version
uses: "paulhatch/semantic-version@v5.0.2"
with:
version: ${{ steps.previoustag.outputs.tag }}
tag_prefix: "v"
version_format: "v${major}.${minor}.${patch}-prerelease${increment}"

- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.semvers.outputs.v_patch }}
prerelease : false
makeLatest: true
name: Pre-release ${{ steps.semvers.outputs.v_patch }}
tag: ${{ steps.version.outputs.version }}
prerelease : true
makeLatest: false
name: ${{ steps.version.outputs.version }}
artifacts: "**/CrossBrowser.Avalonia.exe,**/CrossBrowser.WPF.exe"
62 changes: 31 additions & 31 deletions .github/workflows/win-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,36 @@ jobs:
with:
fetch-depth: 0

# - name: Setup .NET
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: ${{ env.DOTNET_VERSION }}
#
# - name: Install WPF dependencies
# run: dotnet restore ${{ env.WPF_PROJECT_PATH}}
#
# - name: Build WPF
# run: dotnet build ${{ env.WPF_PROJECT_PATH}} -c Release --no-restore
#
# # TODO: sign package before publishing
# - name: Publish WPF
# run: dotnet publish ${{ env.WPF_PROJECT_PATH}} -c Release --self-contained -p:PublishSingleFile=true
# env:
# # TODO: support other RuntimeIdentifiers
# RuntimeIdentifier: win-x64
#
# - name: Install Avalonia Windows dependencies
# run: dotnet restore ${{ env.AVALONIA_PROJECT_PATH}} -p:Configuration=Avalonia-Win-Release
#
# - name: Build Avalonia Windows
# run: dotnet build ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release --no-restore
#
# # TODO: sign package before publishing
# - name: Publish Avalonia Windows
# run: dotnet publish ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release
# env:
# # TODO: support other RuntimeIdentifiers
# RuntimeIdentifier: win-x64
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install WPF dependencies
run: dotnet restore ${{ env.WPF_PROJECT_PATH}}

- name: Build WPF
run: dotnet build ${{ env.WPF_PROJECT_PATH}} -c Release --no-restore

# TODO: sign package before publishing
- name: Publish WPF
run: dotnet publish ${{ env.WPF_PROJECT_PATH}} -c Release --self-contained -p:PublishSingleFile=true
env:
# TODO: support other RuntimeIdentifiers
RuntimeIdentifier: win-x64

- name: Install Avalonia Windows dependencies
run: dotnet restore ${{ env.AVALONIA_PROJECT_PATH}} -p:Configuration=Avalonia-Win-Release

- name: Build Avalonia Windows
run: dotnet build ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release --no-restore

# TODO: sign package before publishing
- name: Publish Avalonia Windows
run: dotnet publish ${{ env.AVALONIA_PROJECT_PATH}} -c Avalonia-Win-Release
env:
# TODO: support other RuntimeIdentifiers
RuntimeIdentifier: win-x64

- name: 'Update version'
id: version
Expand All @@ -69,5 +69,5 @@ jobs:
tag: ${{ steps.version.outputs.version }}
prerelease : false
makeLatest: true
name: Release ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }}
artifacts: "**/CrossBrowser.Avalonia.exe,**/CrossBrowser.WPF.exe"

0 comments on commit 7c3e357

Please sign in to comment.