From eeb7b3b6630a3eb455d42af1e6a1b4b102278b63 Mon Sep 17 00:00:00 2001 From: Nik Date: Tue, 1 Oct 2024 23:47:27 +0100 Subject: [PATCH 1/3] [AMEND] Workflow amend, put build part back in --- .github/workflows/release.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d41d062..e2e9e80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,31 +8,31 @@ on: - "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: @@ -53,7 +53,7 @@ jobs: run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV - name: Show VERSION - run: echo "${VERSION}" + run: echo "$VERSION" - name: Pack run: dotnet pack src\AccessibleMediaPicker\HCS.Media.AccessibleMediaPicker.csproj --output ./artifacts --configuration Release -p:Version=$VERSION From c3b635ec9d44fd51bd8100c519da5568cc0ad020 Mon Sep 17 00:00:00 2001 From: Nik Date: Wed, 2 Oct 2024 00:11:50 +0100 Subject: [PATCH 2/3] [AMEND] Workflow combine build and pack stages --- .github/workflows/release.yml | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2e9e80..b58ae0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,37 +26,15 @@ jobs: 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 - 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: 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 @@ -64,7 +42,7 @@ jobs: publish: runs-on: ubuntu-latest - needs: pack + needs: build if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') steps: - name: Setup .NET v8 From 4ccbc90be645e1fd8ea953e4aecfd4808ad0d694 Mon Sep 17 00:00:00 2001 From: Nik Date: Wed, 2 Oct 2024 00:14:09 +0100 Subject: [PATCH 3/3] [AMEND] remove prefix from Tag trigger --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b58ae0a..db147f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ name: Release Package on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+*" + - "[0-9]+.[0-9]+.[0-9]+*" jobs: build: