Skip to content

VCI-796: Improve comments for skipped targets #461

VCI-796: Improve comments for skipped targets

VCI-796: Improve comments for skipped targets #461

Workflow file for this run

name: vc-build CI
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**'
- 'docs/**'
- 'build/**'
- 'README.md'
- 'LICENSE'
branches:
[main, dev]
pull_request:
branches:
[dev]
paths-ignore:
- 'docs/**'
- 'README.md'
- 'LICENSE'
jobs:
ci:
runs-on: ubuntu-latest
env:
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NUGET_KEY: ${{ secrets.NUGET_KEY }}
BLOB_SAS: ${{ secrets.BLOB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install VirtoCommerce.GlobalTool
run: |
dotnet pack
dotnet tool install -g VirtoCommerce.GlobalTool --add-source ./src/VirtoCommerce.Build/artifacts
- name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Get changelog
id: changelog
uses: VirtoCommerce/vc-github-actions/changelog-generator@master
- name: Get Image Version
uses: VirtoCommerce/vc-github-actions/get-image-version@master
id: image
with:
projectType: "platform"
releaseBranch: "main"
- name: Add version suffix
if: ${{ github.ref != 'refs/heads/main' }}
uses: VirtoCommerce/vc-github-actions/add-version-suffix@master
with:
versionSuffix: ${{ steps.image.outputs.suffix }}
- name: SonarCloud Begin
uses: VirtoCommerce/vc-github-actions/sonar-scanner-begin@master
- name: Build
run: vc-build Compile
- name: Unit Tests
run: vc-build Test -skip
- name: Shelltest
shell: bash
working-directory: shelltests
run: |
sudo apt install shelltestrunner
shelltest .
- name: SonarCloud End
uses: VirtoCommerce/vc-github-actions/sonar-scanner-end@master
- name: Quality Gate
uses: VirtoCommerce/vc-github-actions/sonar-quality-gate@master
with:
login: ${{secrets.SONAR_TOKEN}}
- name: Publish Nuget
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main') && github.event_name != 'workflow_dispatch' }}
uses: VirtoCommerce/vc-github-actions/publish-nuget@master
- name: Create Release
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main') && github.event_name != 'workflow_dispatch' }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.image.outputs.shortVersion }}
release_name: ${{ steps.image.outputs.shortVersion }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: ${{ github.ref != 'refs/heads/main' }}
- name: Upload Release Asset
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main') && github.event_name != 'workflow_dispatch' }}
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: artifacts/VirtoCommerce.GlobalTool.${{ steps.image.outputs.shortVersion }}.nupkg
asset_name: VirtoCommerce.GlobalTool.${{ steps.image.outputs.shortVersion }}.nupkg
asset_content_type: application/zip