Skip to content

Commit

Permalink
Update GitHub workflow to target v3.0.2 branch
Browse files Browse the repository at this point in the history
The GitHub Actions workflow has been updated to focus on the v3.0.2 branch instead of the main branch. As part of this change, the verification step and VERSION setting have been adjusted to reflect the new branch name.
  • Loading branch information
sfmskywalker committed Jan 7, 2024
1 parent a8878e2 commit 57920fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- v3.0.2
release:
types: [ prereleased, published ]
env:
Expand All @@ -18,18 +18,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Verify commit exists in origin/main
- name: Verify commit exists in origin/v3.0.2
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
git branch --remote --contains | grep origin/v3.0.2
- name: Set VERSION variable
run: |
if [[ "${{ github.ref }}" == refs/tags/* && "${{ github.event_name }}" == "release" && "${{ github.event.action }}" == "published" ]]; then
TAG_NAME=${{ github.ref }} # e.g., refs/tags/3.0.0
TAG_NAME=${TAG_NAME#refs/tags/} # remove the refs/tags/ prefix
echo "VERSION=${TAG_NAME}" >> $GITHUB_ENV
else
echo "VERSION=3.0.1-preview.${{github.run_number}}" >> $GITHUB_ENV
echo "VERSION=3.0.2-preview.${{github.run_number}}" >> $GITHUB_ENV
fi
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
Expand Down

0 comments on commit 57920fc

Please sign in to comment.