Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
Updating Github Action workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Oct 26, 2020
1 parent 3874b58 commit 8e2639a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,49 @@ jobs:

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@dev
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@dev
uses: VirtoCommerce/vc-github-actions/sonar-theme@master

- name: Build
uses: VirtoCommerce/vc-github-actions/build-theme@dev
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' }}
uses: VirtoCommerce/vc-github-actions/build-theme@master

- name: Publish
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' }}
id: publish
uses: VirtoCommerce/vc-github-actions/publish-theme@dev
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 }}
tag_name: ${{ steps.image.outputs.prefix }}
release_name: ${{ steps.image.outputs.prefix }}
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
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.publish.outputs.artifactPath }}
asset_name: ${{ steps.publish.outputs.artifactName }}
asset_content_type: application/zip
41 changes: 41 additions & 0 deletions .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# v1
name: Theme Release alpha CI
on:
workflow_dispatch:


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
with:
versionSuffix: ${{ steps.image.outputs.fullSuffix }}

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

0 comments on commit 8e2639a

Please sign in to comment.