Skip to content

Commit

Permalink
setting the build version in the frontend release
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-zhur committed Jun 15, 2024
1 parent a617d30 commit f6ab4b9
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,26 @@ jobs:
run: dotnet build OneShelf.Frontend/OneShelf.Frontend.Web/OneShelf.Frontend.Web.csproj --no-restore --configuration Release
- name: Publish 1
run: dotnet publish OneShelf.Frontend/OneShelf.Frontend.Web/OneShelf.Frontend.Web.csproj --no-restore --configuration Release


- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Replace 1
uses: richardrigutins/replace-in-files@v2
with:
files: 'OneShelf.Frontend/OneShelf.Frontend.Web/wwwroot/service-worker.published.js'
search-text: '{#CACHE_VERSION#}'
replacement-text: "${{ github.ref_name }}-${{ steps.date.outputs.date }}"

- name: Replace 2
uses: richardrigutins/replace-in-files@v2
with:
files: 'OneShelf.Frontend/OneShelf.Frontend.Web/wwwroot/index.html'
search-text: '{#CACHE_VERSION#}'
replacement-text: "${{ github.ref_name }}-${{ steps.date.outputs.date }}"


- run: Compress-Archive -Path OneShelf.Frontend/OneShelf.Frontend.Web/bin/Release/net8.0/publish/* -Destination OneShelf.Frontend.Web.zip

- uses: "marvinpinto/action-automatic-releases@latest"
Expand Down

0 comments on commit f6ab4b9

Please sign in to comment.