create-and-release-web-apps #20
This file contains 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-and-release-web-apps" | |
permissions: | |
actions: write | |
packages: write | |
contents: write | |
on: | |
push: | |
branches: ["not-existent-main"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Set up .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Build with dotnet | |
run: dotnet build frontend/frontend.csproj --configuration Release | |
- name: dotnet publish | |
run: dotnet publish frontend/frontend.csproj -c Release | |
- name: Build with dotnet | |
run: dotnet build catalog/catalog.csproj --configuration Release | |
- name: dotnet publish | |
run: dotnet publish catalog/catalog.csproj -c Release | |
- name: Build with dotnet | |
run: dotnet build ordering/ordering.csproj --configuration Release | |
- name: dotnet publish | |
run: dotnet publish ordering/ordering.csproj -c Release | |
- name: create a relase with version provided by package push | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: "${{ secrets.EXTENDED_ACCESSTOKEN }}" | |
tag_name: "v${{github.env.GitVersion_SemVer}}" | |
generate_release_notes: true | |
files: | | |
ordering/bin/Release/net6.0/publish/* | |
catalog/bin/Release/net6.0/publish/* | |
frontend/bin/Release/net6.0/publish/* | |