Skip to content

Commit

Permalink
Add a changelog and release tracking workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwaldron committed Apr 30, 2024
1 parent 40dff0a commit d43b5d4
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 45 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/raygun-deployment.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/release-tracking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Workflow to register a new application version with both GitHub Releases and Raygun deployment tracking.

# The workflow is triggered when a tag in the format "v1.0.0" is pushed to GitHub.
#
# To use this workflow, you must add two "Action secrets" in the GitHub repository settings:
#
# * RAYGUN_APIKEY = the API key for the Raygun project
# * RAYGUN_AUTHTOKEN = a "Personal Access Token" for your user account
# (generated at https://app.raygun.com/user/tokens)
#
# Learn more about Raygun Deployment Tracking at:
# https://raygun.com/documentation/product-guides/deployment-tracking/overview/
#
# Learn more about the GitHub release action at:
# https://github.com/marketplace/actions/git-release

name: Release Tracking

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
release-tracking:
runs-on: ubuntu-latest
steps:
- name: Get the version number
id: get_version
uses: jannemattila/get-version-from-tag@v3

- name: Display version
run: |
VERSION=$(echo "${{ steps.get_version.outputs.version }}")
echo $VERSION
- name: Send to the Raygun Deployments API
id: raygun_deployment
uses: fjogeleit/http-request-action@v1.15
with:
url: https://api.raygun.com/v3/applications/api-key/${{ secrets.RAYGUN_APIKEY }}/deployments
method: POST
bearerToken: ${{ secrets.RAYGUN_AUTHTOKEN }}
data: >-
{
"version": "${{ steps.get_version.outputs.version }}",
"ownerName": "${{ github.event.pusher.name }}",
"emailAddress": "${{ github.event.pusher.email }}",
"scmIdentifier": "${{ github.sha }}",
"scmType": "GitHub"
}
- name: Show Raygun response
run: echo ${{ steps.raygun_deployment.outputs.response }}

- name: Check out repository
uses: actions/checkout@v4

- name: Create GitHub Release
id: github_release
uses: docker://ghcr.io/anton-yurchenko/git-release:v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Show GitHub response
run: echo ${{ steps.github_release.outputs.response }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

## [X.Y.Z] - YYYY-MM-DD

_Add a changelog using the [Common Changelog](https://common-changelog.org/) format._

[X.Y.Z]: https://github.com/gaepdit/template-app/releases/tag/vX.Y.Z
25 changes: 15 additions & 10 deletions src/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LigerShark.WebOptimizer.Core"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer"/>
<PackageReference Include="Microsoft.Identity.Web"/>
<PackageReference Include="Microsoft.Web.LibraryManager.Build"/>
<PackageReference Include="Mindscape.Raygun4Net.AspNetCore"/>
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders"/>
<PackageReference Include="LigerShark.WebOptimizer.Core" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="Microsoft.Identity.Web" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" />
<PackageReference Include="Mindscape.Raygun4Net.AspNetCore" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" />
<PackageReference Include="SonarAnalyzer.CSharp">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore"/>
<PackageReference Include="Swashbuckle.AspNetCore" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LocalRepository\LocalRepository.csproj"/>
<ProjectReference Include="..\EfRepository\EfRepository.csproj"/>
<ProjectReference Include="..\LocalRepository\LocalRepository.csproj" />
<ProjectReference Include="..\EfRepository\EfRepository.csproj" />
</ItemGroup>

<ItemGroup>
Expand All @@ -45,6 +45,11 @@
</None>
</ItemGroup>

<ItemGroup>
<None Include="../../CHANGELOG.md" />
<None Include="../../README.md" />
</ItemGroup>

<ItemGroup>
<MsDeploySkipRules Include="SkipAppSettings">
<ObjectName>filePath</ObjectName>
Expand Down

0 comments on commit d43b5d4

Please sign in to comment.