create-and-release-web-apps #25
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: Zip artifact for deployment | |
run: | | |
zip ordering.zip ordering/bin/Release/net6.0/publish/* -r | |
zip catalog.zip catalog/bin/Release/net6.0/publish/* -r | |
zip frontend.zip frontend/bin/Release/net6.0/publish/* -r | |
- name: create a relase with version provided by package push | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: "${{ secrets.EXTENDED_ACCESSTOKEN }}" | |
tag_name: "v${{env.GitVersion_SemVer}}" | |
generate_release_notes: true | |
files: | | |
ordering.zip | |
catalog.zip | |
frontend.zip | |