Updates project dependencies and target frameworks #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Extract version from tag | |
| id: get_version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $VERSION from ${GITHUB_REF}" | |
| - name: Build | |
| run: dotnet build --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }} | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| # Get all commit messages since last tag or a reasonable limit if this is the first tag | |
| if git describe --tags --abbrev=0 HEAD^ 2>/dev/null; then | |
| # If this is not the first tag, compare with the previous one | |
| PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null) | |
| echo "Getting changes between $PREVIOUS_TAG and ${{ github.ref_name }}" | |
| CHANGELOG=$(git log --pretty=format:"* %s (%h)" $PREVIOUS_TAG..${{ github.ref_name }}) | |
| else | |
| # If this is the first tag, just get the recent commits | |
| echo "This appears to be the first tag, getting the last 20 commits" | |
| CHANGELOG=$(git log -20 --pretty=format:"* %s (%h)") | |
| fi | |
| echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT | |
| echo "$CHANGELOG" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| name: Release ${{ steps.get_version.outputs.VERSION }} | |
| body: | | |
| # VConSharp ${{ steps.get_version.outputs.VERSION }} | |
| ## Changes | |
| ${{ steps.changelog.outputs.CHANGELOG }} | |
| ## Installation | |
| ``` | |
| dotnet add package VConSharp --version ${{ steps.get_version.outputs.VERSION }} | |
| ``` | |
| draft: false | |
| prerelease: false |