release: v1.0.328 #688
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
# v2.0.0 | |
name: Virto-shell CI | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '.github/**' | |
- '.deployment/**' | |
- 'docs/**' | |
- 'README.md' | |
- 'LICENSE' | |
branches: [ main ] | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} | |
VERSION_SUFFIX: '' | |
ARTIFACT_URL: '' | |
GITHUB_USER: '${{ github.repository_owner }}' | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup .npmrc file to publish to GitHub Packages | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'yarn' | |
always-auth: true | |
- name: Set GITHUB_USER to lowercase | |
run: | | |
echo "GITHUB_USER=${GITHUB_USER,,}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
yarn | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
- name: Get Image Version | |
uses: VirtoCommerce/vc-github-actions/get-image-version@master | |
id: image | |
with: | |
projectType: theme | |
- name: Set release variables | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | | |
echo "VERSION_SUFFIX=${{ steps.image.outputs.prefix }}" >> $GITHUB_ENV | |
- name: Set release-alpha variables | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
echo "VERSION_SUFFIX=${{ steps.image.outputs.fullVersion }}" >> $GITHUB_ENV | |
- name: Set PR variables | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
echo "VERSION_SUFFIX=${{ steps.image.outputs.taggedVersion }}" >> $GITHUB_ENV | |
- name: Build virto-shell | |
run: | | |
yarn build | |
- name: Add auth token | |
run: | | |
yarn config set --json npmRegistries '{ "//registry.npmjs.org": { "npmAuthToken": "'"${NPM_TOKEN}"'" } }' | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish virto-shell npm | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: yarn run publish | |
Storybook: | |
needs: 'CI' | |
uses: VirtoCommerce/vc-shell/.github/workflows/storybook-ci.yml@main | |
with: | |
event_name: ${{ github.event_name }} | |
secrets: | |
VCMP_PLATFORM_TOKEN: ${{ secrets.VCMP_PLATFORM_TOKEN }} |