move pics to github #40
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: CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
dotnet_angular: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 14.x | |
- name: Install Angular | |
run: | | |
npm install @angular/cli -g | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
default_bump: patch | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build .NET | |
run: dotnet build --no-restore | |
# - name: Install Coveralls tool | |
# run: dotnet tool install --global coveralls.net | |
- name: Test .NET | |
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info | |
working-directory: ./backend/OSCommanderTests/ | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./backend/OSCommanderTests/lcov.info | |
# - name: Upload coverage report | |
# run: csmacnz.Coveralls --opencover -i ./backend/OSCommanderTests/coverage.opencover.xml --repoToken $COVERALLS_TOKEN | |
# env: | |
# COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | |
- name: Build .NET (publish) | |
run: dotnet publish --no-restore -c Release /p:version=${{ steps.tag_version.outputs.new_version }} /p:build=$GITHUB_RUN_ID --output "./publish" | |
working-directory: ./backend/WebApi/ | |
- name: Install Angular dependencies | |
run: | | |
npm ci | |
working-directory: ./frontend/web-app | |
- name: Build Angular | |
run: | | |
ng build --configuration=production --output-hashing=all --output-path=./dist | |
working-directory: ./frontend/web-app | |
- name: Create .NET artifact (zip) | |
uses: TheDoctor0/[email protected] | |
with: | |
filename: web-api.zip | |
directory: ./backend/WebApi/publish | |
- name: Create Angular artifact (zip) | |
uses: TheDoctor0/[email protected] | |
with: | |
filename: web-app.zip | |
directory: ./frontend/web-app/dist | |
- name: Create a Release | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: ./frontend/web-app/dist/web-app.zip,./backend/WebApi/publish/web-api.zip | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
name: Release ${{ steps.tag_version.outputs.new_tag }} | |
token: ${{ secrets.GITHUB_TOKEN }} |