Skip to content

fix: update validation command #37

fix: update validation command

fix: update validation command #37

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
jobs:
quality:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- args: [--global, gulp, prettier, typescript]
- name: Run tests
run: |
pnpm build:bus
pnpm build:core
pnpm test
pnpm build:vue
pnpm build:w-oruga
pnpm build:w-vuetify
pnpm build:w-quasar
pnpm build:w-element
pnpm build:p-rule-parsers
pnpm build:p-vue3-toastify
compute-new-tag-version:
needs: quality
timeout-minutes: 15
runs-on: ubuntu-latest
outputs:
fromTag: ${{ steps.fromTag.outputs.tag }}
toTag: ${{ steps.toTag.outputs.tag }}
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: 'Get Previous tag'
id: fromTag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Installing python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Installing poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.6.1'
- name: Install deps
run: poetry install
- name: Run matic-release
run: poetry run python scripts/release.py --ci
- name: Publish tag
run: git push --tags
- name: 'Get lastest tag'
id: toTag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
publish:
runs-on: ubuntu-latest
needs: compute-new-tag-version
if: ${{ needs.compute-new-tag-version.outputs.fromTag != needs.compute-new-tag-version.outputs.toTag }}
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: install pnpm
run: npm i pnpm@8.15.7 -g
- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: install dependencies
run: pnpm install
- name: Build and publish
run: |
pnpm -w run release ${{ needs.compute-new-tag-version.outputs.toTag }}
pnpm build:bus
pnpm build:core
pnpm build:vue
pnpm build:w-oruga
pnpm build:w-vuetify
pnpm build:w-quasar
pnpm build:w-element
pnpm build:p-rule-parsers
pnpm build:p-vue3-toastify
pnpm --filter "./packages/**" publish --no-git-checks
generate-release:
runs-on: ubuntu-latest
needs:
- compute-new-tag-version
- publish
if: ${{ needs.compute-new-tag-version.outputs.fromTag != needs.compute-new-tag-version.outputs.toTag }}
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up git-cliff
uses: kenji-miyake/setup-git-cliff@v1
- name: Run git-cliff
run: |
{
echo 'CHANGELOG<<EOF'
git cliff --latest
echo EOF
} >> "$GITHUB_ENV"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: ${{ env.CHANGELOG }}
tag_name: ${{ needs.compute-new-tag-version.outputs.toTag }}