feat: add semantic release

This commit is contained in:
mashal-m
2023-02-25 00:35:41 +05:00
parent 69a4580b71
commit 109643fd76

View File

@@ -22,22 +22,31 @@ jobs:
outputs: outputs:
new-release-published: ${{ steps.get-next-version.outputs.new-release-published }} new-release-published: ${{ steps.get-next-version.outputs.new-release-published }}
new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} new-release-version: ${{ steps.get-next-version.outputs.new-release-version }}
build: tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: next-version strategy:
if: needs.get-next-version.outputs.new-release-published == 'true' matrix:
node: [16]
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
- run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}" uses: actions/checkout@v3
release: with:
runs-on: ubuntu-latest fetch-depth: 0
needs: build - name: Setup Nodejs
steps: uses: actions/setup-node@v3
- uses: actions/checkout@v3 with:
- uses: actions/setup-node@v3 node-version: ${{ matrix.node }}
with: - name: Install dependencies
node-version: 16 run: npm ci
- run: npm ci - name: Validate package-lock.json changes
- run: npx semantic-release run: make validate-no-uncommitted-package-lock-changes
env: - name: Lint
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: i18n_extract
run: npm run i18n_extract
- name: Coverage
uses: codecov/codecov-action@v3