Skip to content

Commit

Permalink
chore: rework CI
Browse files Browse the repository at this point in the history
- Use semantic-release
- Stop syncrhonizing vscode versions
- Add commitlint
  • Loading branch information
Loïc Mangeonjean committed Jan 26, 2024
1 parent 4553165 commit ca24668
Show file tree
Hide file tree
Showing 7 changed files with 12,683 additions and 5,331 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/check_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ on:
- main

jobs:
lint-commits:
name: Lint commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# we actually need "github.event.pull_request.commits + 1" commit
fetch-depth: 0
- uses: actions/setup-node@v3
- run: npm ci --ignore-scripts
- run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
check:
name: Check build
runs-on: ubuntu-latest
Expand All @@ -20,6 +31,11 @@ jobs:
run: npm ci
- name: Build
run: npm run build
- name: Release dry run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release -- --dry-run
- name: Install demo dependencies
working-directory: ./demo
run: npm ci
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
name: Release

on:
workflow_dispatch:
inputs:
changes:
description: 'Changes in the releases'
required: true
type: string
env:
RELEASE_CHANGES: ${{ github.event.inputs.changes }}

on: workflow_dispatch
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
Expand Down Expand Up @@ -55,6 +46,7 @@ jobs:
path: ./demo/dist/
retention-days: 7
deploy:
if: success() && github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@codingame/commitlint-config-codingame']
};
Loading

0 comments on commit ca24668

Please sign in to comment.