Skip to content
This repository was archived by the owner on Apr 22, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# v1
name: Theme CI
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**'
- 'docs/**'
- 'build/**'
- 'README.md'
- 'LICENSE'
branches:
[master, dev]
pull_request:
branches:
[master, dev]
paths-ignore:
- '.github/**'
- 'docs/**'
- 'build/**'
- 'README.md'
- 'LICENSE'

jobs:
ci:
runs-on: ubuntu-latest
env:
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
BLOB_SAS: ${{ secrets.BLOB_TOKEN }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v1

- name: Get Image Version
uses: VirtoCommerce/vc-github-actions/get-image-version@master
id: image

- name: Get changelog
id: changelog
uses: VirtoCommerce/vc-github-actions/changelog-generator@master

- name: SonarCloud Scan
uses: VirtoCommerce/vc-github-actions/sonar-theme@master

- name: Build
uses: VirtoCommerce/vc-github-actions/build-theme@master

- name: Publish
id: publish
uses: VirtoCommerce/vc-github-actions/publish-theme@master

- name: Create Release
if: github.ref == 'refs/heads/master'
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.image.outputs.tag }}
release_name: ${{ steps.image.outputs.tag }}
draft: false
prerelease: false
body: ${{ steps.changelog.outputs.changelog }}

- name: Upload Release Asset
if: github.ref == 'refs/heads/master'
id: upload-release-asset
uses: actions/upload-release-asset@v1
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: ${{ steps.publish.outputs.artifactPath }}
asset_name: ${{ steps.publish.outputs.artifactName }}
asset_content_type: application/zip