Skip to content

Commit

Permalink
Merge pull request #13 from NikRimington/dev/v1
Browse files Browse the repository at this point in the history
[AMEND] Fix the workflow for TAG based versioning
  • Loading branch information
NikRimington authored Oct 1, 2024
2 parents 618d7cd + 4ccbc90 commit e4aa97e
Showing 1 changed file with 10 additions and 32 deletions.
42 changes: 10 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,13 @@ name: Release Package
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
- "[0-9]+.[0-9]+.[0-9]+*"

jobs:
# build:
build:

# runs-on: windows-latest

# steps:

# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Setup .NET v6
# uses: actions/setup-dotnet@v2
# with:
# dotnet-version: 6.0.x

# - name: Setup .NET v8
# uses: actions/setup-dotnet@v2
# with:
# dotnet-version: 8.0.x

# - name: Build project
# run: dotnet build src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --configuration Release

pack:
runs-on: windows-latest
#needs: build
if: github.event_name == 'push'

steps:

- name: Checkout repository
Expand All @@ -48,23 +26,23 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x

- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV


- name: Show VERSION
run: echo "${VERSION}"
run: echo "$GITHUB_REF_NAME"

- name: Build project
run: dotnet build src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --configuration Release -p:Version=$GITHUB_REF_NAME

- name: Pack
run: dotnet pack src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --output ./artifacts --configuration Release -p:Version=$VERSION
run: dotnet pack src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --output ./artifacts --configuration Release -p:Version=$GITHUB_REF_NAME
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: ./artifacts

publish:
runs-on: ubuntu-latest
needs: pack
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Setup .NET v8
Expand Down

0 comments on commit e4aa97e

Please sign in to comment.