Skip to content

Commit

Permalink
Merge pull request #12 from NikRimington/dev/v1
Browse files Browse the repository at this point in the history
[AMEND] Remove Build and change Version extraction
  • Loading branch information
NikRimington authored Oct 1, 2024
2 parents a378519 + 468ac85 commit 618d7cd
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@ name: Release Package
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
- "v[0-9]+.[0-9]+.[0-9]+*"

jobs:
build:
# build:

runs-on: windows-latest
# runs-on: windows-latest

steps:
# steps:

- name: Checkout repository
uses: actions/checkout@v3
# - 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 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: 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
# - name: Build project
# run: dotnet build src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --configuration Release

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

Expand All @@ -49,8 +49,11 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Determine version
run: echo "::set-env name=VERSION::$(git describe --tags --dirty)"
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV

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

- name: Pack
run: dotnet pack src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --output ./artifacts --configuration Release -p:Version=$VERSION
Expand Down

0 comments on commit 618d7cd

Please sign in to comment.